dont return true for removed thing in P_CheckPosition

This commit is contained in:
Alug committed 2024-07-28 16:24:11 +02:00
1 parent efaded5016
commit 3f4d399afd
1 file changed
+10 -3
+10 -3
View File
@@ -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