Merge branch 'specialstage_water' into 'master'

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

See merge request STJr/SRB2Internal!364
This commit is contained in:
MascaraSnake 2019-10-10 02:33:05 -04:00
commit 7ceef506fc
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);