diff --git a/src/p_mobj.c b/src/p_mobj.c index d6c0050b7..0f0f8305b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3307,7 +3307,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; @@ -3407,7 +3407,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;