From cc881303627a7ee485415df6b480d228de91819d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 11 May 2016 10:09:13 +0200 Subject: [PATCH] - 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. --- src/p_map.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 5623af25a..e0ee1eaec 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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; }