summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorKiloku <mateus.sateles@protonmail.com>2025-01-04 23:57:13 -0300
committerAlejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com>2025-01-08 14:28:49 -0500
commit0deeddf8cb31ce07c525a1ec8a08159c26bc8eaf (patch)
tree1526c929a31188e3739c70d4b8e6ec6717f4d1a6 /src/engine
parent76dab3e20dc0ddb6b07031be28584367f422db4f (diff)
Add specific charge button option
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/fox_play.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c
index a321371a..0bffddad 100644
--- a/src/engine/fox_play.c
+++ b/src/engine/fox_play.c
@@ -3325,7 +3325,18 @@ bool Player_UpdateLockOn(Player* player) {
s32 i;
bool rapidFire = CVarGetInteger("gRapidFire", 0) == 1;
- if (rapidFire ? !(gInputHold->button & A_BUTTON) : (gInputHold->button & A_BUTTON)) {
+ bool charging;
+ if (rapidFire) {
+ if (CVarGetInteger("gLtoCharge", 0) == 1) {
+ charging = (gInputHold->button & L_TRIG) && !(gInputHold->button & A_BUTTON);
+ }
+ else {
+ charging = !(gInputHold->button & A_BUTTON);
+ }
+ } else {
+ charging = (gInputHold->button & A_BUTTON);
+ }
+ if (charging) {
gChargeTimers[player->num]++;
if (gChargeTimers[player->num] > 21) {
gChargeTimers[player->num] = 21;