When compat_floormove is enabled prevent sector floor from lowering if a thing is stuck in the ceiling (vanilla behavior)

This commit is contained in:
Nikolay Ambartsumov 2023-09-14 20:36:47 +03:00 committed by Christoph Oelckers
parent 30c2524742
commit 4ad76f549e

View file

@ -6652,6 +6652,12 @@ int P_PushDown(AActor *thing, FChangePosition *cpos)
void PIT_FloorDrop(AActor *thing, FChangePosition *cpos)
{
if ((thing->Level->i_compatflags2 & COMPATF2_FLOORMOVE) && (thing->Top() > thing->ceilingz))
{
cpos->nofit = true;
return;
}
double oldfloorz = thing->floorz;
double oldz = thing->Z();
@ -7027,7 +7033,6 @@ bool P_ChangeSector(sector_t *sector, int crunch, double amt, int floorOrCeil, b
}
}
return cpos.nofit;
}