P_CheckPosition: If thing was removed in its remit and iteration has MF_NOCLIP, do not return true

This fixes increment_move in the case of Lightning shield pop
This commit is contained in:
toaster 2023-04-14 14:38:32 +01:00
parent 6fec652bde
commit 2f63669385

View file

@ -2232,7 +2232,8 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re
// 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;
// ...but be careful about removed obj! ~toast 140423
return !P_MobjWasRemoved(thing);
}
validcount++;