mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
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:
parent
e3ded1671c
commit
32562068ba
1 changed files with 7 additions and 8 deletions
15
src/p_mobj.c
15
src/p_mobj.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue