diff --git a/src/p_map.c b/src/p_map.c index a581d4576..028566722 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2131,9 +2131,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re // reset special lines numspechit = 0U; - if (tm.flags & MF_NOCLIP) - return true; - // Check things first, possibly picking things up. // MF_NOCLIPTHING: used by camera to not be blocked by things @@ -2160,6 +2157,15 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re } } + if (tm.flags & 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. + return true; + } + validcount++; // check lines @@ -2628,7 +2634,10 @@ increment_move radius = min(radius, 16*mapobjectscale); do { - if (thing->flags & MF_NOCLIP) + // Sal 12/19/2022 -- PIT_CheckThing code now runs + // with MF_NOCLIP enabled, so we want step-by-step + // for anything that doesn't have both enabled. + if ((thing->flags & (MF_NOCLIP|MF_NOCLIPTHING)) == (MF_NOCLIP|MF_NOCLIPTHING)) { tryx = x; tryy = y;