diff options
| author | Kiloku <mateus.sateles@protonmail.com> | 2025-01-04 21:27:25 -0300 |
|---|---|---|
| committer | Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> | 2025-01-08 14:28:49 -0500 |
| commit | 76dab3e20dc0ddb6b07031be28584367f422db4f (patch) | |
| tree | b0c5c5303956bae32f5d8a12c329ae204e1652af /src/engine/fox_play.c | |
| parent | 0b5dfd900e31e7b7e5b813f4c589596efece2c6a (diff) | |
Rapid fire mode on Blue Marine and Landmaster
Diffstat (limited to 'src/engine/fox_play.c')
| -rw-r--r-- | src/engine/fox_play.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 42af3268..a321371a 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -3323,7 +3323,7 @@ bool Player_CanLockOn(s32 playerNum) { bool Player_UpdateLockOn(Player* player) { bool hasBombTarget; s32 i; - + bool rapidFire = CVarGetInteger("gRapidFire", 0) == 1; if (rapidFire ? !(gInputHold->button & A_BUTTON) : (gInputHold->button & A_BUTTON)) { gChargeTimers[player->num]++; @@ -3476,8 +3476,21 @@ void Player_Shoot(Player* player) { case FORM_LANDMASTER: if (!Player_UpdateLockOn(player)) { - if (gShootButton[player->num] & gInputPress->button) { - Player_TankCannon(player); + if (rapidFire) { + if (gShootButton[player->num] & (gInputHold->button)) { + if (player-> shotTimer > 0) { + player->shotTimer--; + } + if (player->shotTimer <= 0){ + Player_TankCannon(player); + player->shotTimer = 3; + } + } + } + else { + if (gShootButton[player->num] & (gInputPress->button)) { + Player_TankCannon(player); + } } Player_SmartBomb(player); } |
