Skip to content

Commit

Permalink
Variable is Static, not Global
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiloku committed Dec 30, 2024
1 parent ac3be42 commit 7781cc0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/engine/fox_tank.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ u8 D_800C9F04 = 0;
u8 D_800C9F08 = 0;
s32 D_800C9F0C = 0; // unused.
f32 D_800C9F10 = 0.0f;
s32 gTankActiveBurnerCount = 0;
s32 sTankActiveBurnerCount = 0;
s32 D_800C9F18[2] = { 0, 0 }; // unused.
f32 D_800C9F20 = 0.0f;
f32 D_800C9F24 = 0.0f;
Expand Down Expand Up @@ -549,7 +549,7 @@ void func_tank_80045348(Player* player) {

if (player->unk_19C >= 0) {
if ((gBoostButton[player->num] & gInputHold->button) && !player->boostCooldown) {
gTankActiveBurnerCount++;
sTankActiveBurnerCount++;
sp2E = true;
if (D_800C9F24 == 0.0f) {
player->unk_190 = player->unk_194 = 4.0f;
Expand All @@ -572,7 +572,7 @@ void func_tank_80045348(Player* player) {
D_800C9F24 = 0.0f;
}
if ((gBrakeButton[player->num] & gInputHold->button) && !player->boostCooldown && !sp2E) {
gTankActiveBurnerCount++;
sTankActiveBurnerCount++;
baseSpeedTarget = 5.0f;
sp40 = 100.0f;
sp3C = 0.2f;
Expand All @@ -599,7 +599,7 @@ void func_tank_80045678(Player* player) {
Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE);
}
if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) {
gTankActiveBurnerCount++;
sTankActiveBurnerCount++;
if (D_800C9F20 == 0.0f) {
AUDIO_PLAY_SFX(NA_SE_TANK_BURNER_HALF, player->sfxSource, 0);
}
Expand Down Expand Up @@ -629,7 +629,7 @@ void func_tank_80045678(Player* player) {
Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE);
}
if ((gInputHold->button & R_TRIG) && !player->boostCooldown) {
gTankActiveBurnerCount++;
sTankActiveBurnerCount++;
if (player->unk_2C0 == 0.0f) {
AUDIO_PLAY_SFX(NA_SE_TANK_BURNER_HALF, player->sfxSource, 0);
}
Expand Down Expand Up @@ -1115,12 +1115,12 @@ void Tank_UpdateOnRails(Player* player) {

player->wingPosition = 1;
func_tank_80045130(player);
gTankActiveBurnerCount = 0;
sTankActiveBurnerCount = 0;
func_tank_80045678(player);
func_tank_80045348(player);
if (!player->boostCooldown) {
if (gTankActiveBurnerCount != 0) {
if (gTankActiveBurnerCount >= 2) {
if (sTankActiveBurnerCount != 0) {
if (sTankActiveBurnerCount >= 2) {
player->boostMeter += 2.0f;
} else {
player->boostMeter += 1.0f;
Expand Down

0 comments on commit 7781cc0

Please sign in to comment.