Merge branch 'platformpmomz' into 'next'

Do not apply pmomz when jumping/bouncing through a platform

Closes #72

See merge request STJr/SRB2!1955
This commit is contained in:
Krabs 2023-11-14 04:02:39 +00:00
commit 177bdd6868

View file

@ -3073,11 +3073,14 @@ static boolean P_ThingHeightClip(mobj_t *thing)
if (!rover || ((rover->fofflags & FOF_EXISTS) && (rover->fofflags & FOF_SOLID)))
{
hitfloor = bouncing;
if (thing->eflags & MFE_VERTICALFLIP)
thing->pmomz = thing->ceilingz - (thing->z + thing->height);
else
thing->pmomz = thing->floorz - thing->z;
thing->eflags |= MFE_APPLYPMOMZ;
if (!(thing->player) || !(thing->player->pflags & PF_JUMPED || bouncing))
{
if (thing->eflags & MFE_VERTICALFLIP)
thing->pmomz = thing->ceilingz - (thing->z + thing->height);
else
thing->pmomz = thing->floorz - thing->z;
thing->eflags |= MFE_APPLYPMOMZ;
}
if (thing->eflags & MFE_VERTICALFLIP)
thing->z = thing->ceilingz - thing->height;