mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
More consistent momentum handling for "groundpounding" shield abilities (elemental, bubble) in THZ goop.
This commit is contained in:
parent
c221a89c67
commit
2439b2cb32
1 changed files with 2 additions and 2 deletions
|
@ -3314,7 +3314,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
ffloor_t *rover;
|
ffloor_t *rover;
|
||||||
player_t *p = mobj->player; // Will just be null if not a player.
|
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)
|
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.
|
// Default if no water exists.
|
||||||
mobj->watertop = mobj->waterbottom = mobj->z - 1000*FRACUNIT;
|
mobj->watertop = mobj->waterbottom = mobj->z - 1000*FRACUNIT;
|
||||||
|
@ -3414,7 +3414,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
p->powers[pw_underwater] = underwatertics + 1;
|
p->powers[pw_underwater] = underwatertics + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasgroundpounding)
|
if ((wasgroundpounding = ((mobj->eflags & MFE_GOOWATER) && wasgroundpounding)))
|
||||||
{
|
{
|
||||||
p->pflags &= ~PF_SHIELDABILITY;
|
p->pflags &= ~PF_SHIELDABILITY;
|
||||||
mobj->momz >>= 1;
|
mobj->momz >>= 1;
|
||||||
|
|
Loading…
Reference in a new issue