mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reduced momentum killing of groundpound into slime per Mystic's request.
This commit is contained in:
parent
095a438e9e
commit
fe6b4c4875
1 changed files with 3 additions and 2 deletions
|
|
@ -3590,6 +3590,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));
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
@ -3691,7 +3692,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
p->powers[pw_underwater] = underwatertics + 1;
|
p->powers[pw_underwater] = underwatertics + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mobj->eflags & MFE_GOOWATER) && ((p->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL || (p->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP) && (p->pflags & PF_SHIELDABILITY))
|
if (wasgroundpounding)
|
||||||
{
|
{
|
||||||
p->pflags &= ~PF_SHIELDABILITY;
|
p->pflags &= ~PF_SHIELDABILITY;
|
||||||
mobj->momz >>= 1;
|
mobj->momz >>= 1;
|
||||||
|
|
@ -3713,7 +3714,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->ceilingz-mobj->waterbottom <= height>>1))
|
|| ((mobj->eflags & MFE_VERTICALFLIP) && mobj->ceilingz-mobj->waterbottom <= height>>1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((mobj->eflags & MFE_GOOWATER || wasingoo)) { // Decide what happens to your momentum when you enter/leave goopy water.
|
if (!wasgroundpounding && (mobj->eflags & MFE_GOOWATER || wasingoo)) { // Decide what happens to your momentum when you enter/leave goopy water.
|
||||||
if (P_MobjFlip(mobj)*mobj->momz < 0) // You are entering the goo?
|
if (P_MobjFlip(mobj)*mobj->momz < 0) // You are entering the goo?
|
||||||
mobj->momz = FixedMul(mobj->momz, FixedDiv(2*FRACUNIT, 5*FRACUNIT)); // kill momentum significantly, to make the goo feel thick.
|
mobj->momz = FixedMul(mobj->momz, FixedDiv(2*FRACUNIT, 5*FRACUNIT)); // kill momentum significantly, to make the goo feel thick.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue