From 073e63ed045db1e1b3de99a1cd4368606eb8c4a4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Feb 2017 10:50:21 +0100 Subject: [PATCH] - 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. --- src/p_map.cpp | 4 ++-- src/p_mobj.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 9b3a257ec..6413b392b 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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 diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index d6da38961..dfb0c7312 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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; }