- Added a check for all z-movement for floor huggers so that it doesn't skip all the height checks if +NODROPOFF is also given.

This commit is contained in:
Christoph Oelckers 2017-02-27 10:50:21 +01:00
parent 0c660ff29c
commit 073e63ed04
2 changed files with 3 additions and 3 deletions

View file

@ -2281,7 +2281,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
}
#endif
}
if (!(thing->flags & MF_TELEPORT) && !(thing->flags3 & MF3_FLOORHUGGER))
if (!(thing->flags & MF_TELEPORT) && (!(thing->flags3 & MF3_FLOORHUGGER) || thing->flags5 & MF5_NODROPOFF))
{
if ((thing->flags & MF_MISSILE) && !(thing->flags6 & MF6_STEPMISSILE) && tm.floorz > thing->Z())
{ // [RH] Don't let normal missiles climb steps
@ -2772,7 +2772,7 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags)
if (thing->Top() > tm.ceilingz)
return false;
}
if (!(thing->flags & MF_TELEPORT) && !(thing->flags3 & MF3_FLOORHUGGER))
if (!(thing->flags & MF_TELEPORT) && (!(thing->flags3 & MF3_FLOORHUGGER) || thing->flags5 & MF5_NODROPOFF))
{
if (tm.floorz - newz > thing->MaxStepHeight)
{ // too big a step up

View file

@ -2958,7 +2958,7 @@ void P_ZMovement (AActor *mo, double oldfloorz)
mo->Vel.Z = 0;
return;
}
else if (mo->flags3 & MF3_FLOORHUGGER)
else if ((mo->flags3 & MF3_FLOORHUGGER) && !(mo->flags5 & MF5_NODROPOFF))
{ // Floor huggers can go up steps
return;
}