- fixed: P_CheckMove's dropoff check had the heights swapped. This also shouldn't in any way depend on COMPATF_DROPOFF and must be skipped entirely for actors with either MF_FLOAT or MF_DROPOFF set.

This commit is contained in:
Christoph Oelckers 2016-05-11 10:09:13 +02:00
parent 77e30bb7d7
commit cc88130362

View file

@ -2533,13 +2533,13 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags)
return false;
}
}
else if (flags & PCM_DROPOFF)
else if ((flags & PCM_DROPOFF) && !(thing->flags & (MF_FLOAT|MF_DROPOFF)))
{
const DVector3 oldpos = thing->Pos();
thing->SetOrigin(pos.X, pos.Y, newz, true);
bool hcheck = (newz - thing->MaxDropOffHeight > thing->dropoffz);
bool hcheck = (newz - thing->dropoffz > thing->MaxDropOffHeight);
thing->SetOrigin(oldpos, true);
if (hcheck && !(thing->flags & MF_FLOAT) && !(i_compatflags & COMPATF_DROPOFF))
if (hcheck)
{
return false;
}