mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +00:00
MP Jingle: Fix underwater music not restoring on air bubble or shield
This commit is contained in:
parent
d14db91133
commit
e0f9cdcfd1
3 changed files with 12 additions and 4 deletions
|
@ -3227,9 +3227,12 @@ void A_WaterShield(mobj_t *actor)
|
|||
}
|
||||
|
||||
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
||||
{
|
||||
player->powers[pw_underwater] = 0;
|
||||
P_RestoreMusic(player);
|
||||
|
||||
player->powers[pw_underwater] = 0;
|
||||
}
|
||||
else
|
||||
player->powers[pw_underwater] = 0;
|
||||
|
||||
if (player->powers[pw_spacetime] > 1)
|
||||
player->powers[pw_spacetime] = 0;
|
||||
|
|
|
@ -1429,7 +1429,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|
||||
// Eaten by player!
|
||||
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
||||
player->powers[pw_underwater] = underwatertics + 1;
|
||||
P_RestoreMusic(player);
|
||||
}
|
||||
|
||||
if (player->powers[pw_underwater] < underwatertics + 1)
|
||||
player->powers[pw_underwater] = underwatertics + 1;
|
||||
|
|
|
@ -9185,9 +9185,12 @@ void P_PlayerThink(player_t *player)
|
|||
if (player->powers[pw_underwater] && (player->pflags & PF_GODMODE || (player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL))
|
||||
{
|
||||
if (player->powers[pw_underwater] <= 12*TICRATE+1)
|
||||
{
|
||||
player->powers[pw_underwater] = 0;
|
||||
P_RestoreMusic(player); //incase they were about to drown
|
||||
|
||||
player->powers[pw_underwater] = 0;
|
||||
}
|
||||
else
|
||||
player->powers[pw_underwater] = 0;
|
||||
}
|
||||
else if (player->powers[pw_underwater] && !(maptol & TOL_NIGHTS) && !((netgame || multiplayer) && player->spectator)) // underwater timer
|
||||
player->powers[pw_underwater]--;
|
||||
|
|
Loading…
Reference in a new issue