Do not apply pmomz when jumping through a platform

This commit is contained in:
spherallic 2023-04-05 23:59:37 +02:00
parent 1470d099e3
commit c907c20480

View file

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