On second thought, I'll revert the P_TryMove bit to how it was before and just stuff an extra P_MobjWasRemoved check in

this way it won't cause as much conflict with the slopetowall transfer branch
This commit is contained in:
Monster Iestyn 2017-01-24 20:21:50 +00:00
parent e3ded1671c
commit 32562068ba

View file

@ -2122,15 +2122,12 @@ void P_XYMovement(mobj_t *mo)
if (CheckForBustableBlocks && mo->flags & MF_PUSHABLE)
P_PushableCheckBustables(mo);
moved = P_TryMove(mo, mo->x + xmove, mo->y + ymove, true); // Move!
if (P_MobjWasRemoved(mo)) // mobj was removed during P_TryMove? don't continue
return;
if (mo->eflags & MFE_SPRUNG) // touching a spring counts as moved
moved = true;
if (!moved) // blocked move
if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true)
&& !(P_MobjWasRemoved(mo) || mo->eflags & MFE_SPRUNG))
{
// blocked move
moved = false;
if (player) {
if (player->bot)
B_MoveBlocked(player);
@ -2246,6 +2243,8 @@ void P_XYMovement(mobj_t *mo)
else
mo->momx = mo->momy = 0;
}
else
moved = true;
if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;;
return;