From 3f4d399afdf585e94624a00a3e9d4b863b26757b Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 28 Jul 2024 16:24:11 +0200 Subject: [PATCH] dont return true for removed thing in P_CheckPosition --- src/p_map.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index bcb2b6a73..cbf317a5b 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1996,9 +1996,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) validcount++; - if (tmflags & MF_NOCLIP) - return true; - // Check things first, possibly picking things up. // MF_NOCLIPTHING: used by camera to not be blocked by things @@ -2014,6 +2011,16 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) } } + if (tmflags & MF_NOCLIP) + { + // Sal 12/19/2022 -- PIT_CheckThing code will still run + // with MF_NOCLIP enabled, but they won't be blocked + // regardless of the result. This allows for SPBs and + // the UFO to collide. + // ...but be careful about removed obj! ~toast 140423 + return !P_MobjWasRemoved(thing); + } + validcount++; // check lines