diff --git a/src/p_mobj.c b/src/p_mobj.c index 5735dc27bc8ca95811dac3ee854c7f7bcd27497f..e33e0aa4958178ec1c3fe9f46ab779ab3a7f792c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3314,7 +3314,7 @@ void P_MobjCheckWater(mobj_t *mobj) ffloor_t *rover; player_t *p = mobj->player; // Will just be null if not a player. fixed_t height = (p ? P_GetPlayerHeight(p) : mobj->height); // for players, calculation height does not necessarily match actual height for gameplay reasons (spin, etc) - boolean wasgroundpounding = (p && (mobj->eflags & MFE_GOOWATER) && ((p->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL || (p->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) && (p->pflags & PF_SHIELDABILITY)); + boolean wasgroundpounding = (p && ((p->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL || (p->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) && (p->pflags & PF_SHIELDABILITY)); // Default if no water exists. mobj->watertop = mobj->waterbottom = mobj->z - 1000*FRACUNIT; @@ -3414,7 +3414,7 @@ void P_MobjCheckWater(mobj_t *mobj) p->powers[pw_underwater] = underwatertics + 1; } - if (wasgroundpounding) + if ((wasgroundpounding = ((mobj->eflags & MFE_GOOWATER) && wasgroundpounding))) { p->pflags &= ~PF_SHIELDABILITY; mobj->momz >>= 1;