- fixed P_CheckMove's dropoff check and removed some unneeded code.

This commit is contained in:
Christoph Oelckers 2016-05-11 11:56:03 +02:00
parent 43d93a19a0
commit 220255e6a4

View file

@ -2535,11 +2535,7 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags)
}
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->dropoffz > thing->MaxDropOffHeight);
thing->SetOrigin(oldpos, true);
if (hcheck)
if (newz - tm.dropoffz > thing->MaxDropOffHeight)
{
return false;
}