mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 05:25:01 +03:00
Rapid fire mode on Blue Marine and Landmaster
This commit is contained in:
parent
0b5dfd900e
commit
76dab3e20d
@ -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);
|
||||
}
|
||||
|
@ -1328,11 +1328,27 @@ void Aquas_BlueMarineShoot(Player* player) {
|
||||
Aquas_801A9DE4(player);
|
||||
}
|
||||
|
||||
if (gInputPress->button & A_BUTTON) {
|
||||
Aquas_BlueMarineLaser(player);
|
||||
bool rapidFire = CVarGetInteger("gRapidFire", 0) == 1;
|
||||
|
||||
if (rapidFire){
|
||||
if (gInputHold->button & A_BUTTON)
|
||||
{
|
||||
if (player-> shotTimer > 0) {
|
||||
player->shotTimer--;
|
||||
}
|
||||
if (player->shotTimer <= 0){
|
||||
Aquas_BlueMarineLaser(player);
|
||||
player->shotTimer = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (gInputPress->button & A_BUTTON) {
|
||||
Aquas_BlueMarineLaser(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (gInputPress->button & B_BUTTON) {
|
||||
if ((rapidFire ? gInputHold->button : gInputPress->button) & B_BUTTON) {
|
||||
Aquas_BlueMarineTorpedo(player);
|
||||
if (D_i3_801C4190[0] != 0) {
|
||||
D_i3_801C4190[3] = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user