Don't deplete special stage timer in water if you have water protection

This commit is contained in:
MascaraSnake 2019-10-07 09:01:17 +02:00
parent ff8c43664a
commit 2113774a6a
2 changed files with 3 additions and 2 deletions

View File

@ -482,7 +482,7 @@ static inline void P_DoSpecialStageStuff(void)
countspheres += players[i].spheres;
// If in water, deplete timer 6x as fast.
if (players[i].mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER))
if (players[i].mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER) && !(players[i].powers[pw_shield] & SH_PROTECTWATER))
players[i].nightstime -= 5;
if (--players[i].nightstime > 6)
{

View File

@ -1857,7 +1857,8 @@ static void ST_drawNiGHTSHUD(void)
numbersize = 48/2;
if ((oldspecialstage && leveltime & 2)
&& (stplyr->mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER)))
&& (stplyr->mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER))
&& !(stplyr->powers[pw_shield] & SH_PROTECTWATER))
col = SKINCOLOR_ORANGE;
ST_DrawNightsOverlayNum((160 + numbersize)<<FRACBITS, 14<<FRACBITS, FRACUNIT, V_PERPLAYER|V_SNAPTOTOP, realnightstime, nightsnum, col);