From 76dab3e20dc0ddb6b07031be28584367f422db4f Mon Sep 17 00:00:00 2001 From: Kiloku Date: Sat, 4 Jan 2025 21:27:25 -0300 Subject: Rapid fire mode on Blue Marine and Landmaster --- src/engine/fox_play.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/engine/fox_play.c') 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); } -- cgit v1.2.3