Fixed non-players having fucked slope stepup/down

This commit is contained in:
RedEnchilada 2016-08-13 17:43:22 -05:00
parent fb8de61a81
commit 758c77fe53
2 changed files with 8 additions and 6 deletions

View file

@ -1970,8 +1970,12 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
} }
// Ramp test // Ramp test
if (thing->player && maxstep > 0 if (maxstep > 0 && !(
&& !(P_PlayerTouchingSectorSpecial(thing->player, 1, 14) || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)) thing->player && (
P_PlayerTouchingSectorSpecial(thing->player, 1, 14)
|| GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)
)
)
{ {
// If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS // If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS
// step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more. // step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more.

View file

@ -1650,8 +1650,6 @@ void P_XYMovement(mobj_t *mo)
I_Assert(mo != NULL); I_Assert(mo != NULL);
I_Assert(!P_MobjWasRemoved(mo)); I_Assert(!P_MobjWasRemoved(mo));
moved = true;
// if it's stopped // if it's stopped
if (!mo->momx && !mo->momy) if (!mo->momx && !mo->momy)
{ {
@ -1708,9 +1706,9 @@ void P_XYMovement(mobj_t *mo)
if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true) && !(mo->eflags & MFE_SPRUNG)) if (!P_TryMove(mo, mo->x + xmove, mo->y + ymove, true) && !(mo->eflags & MFE_SPRUNG))
{ {
// blocked move // blocked move
moved = false;
if (player) { if (player) {
moved = false;
if (player->bot) if (player->bot)
B_MoveBlocked(player); B_MoveBlocked(player);
} }
@ -1815,7 +1813,7 @@ void P_XYMovement(mobj_t *mo)
else else
mo->momx = mo->momy = 0; mo->momx = mo->momy = 0;
} }
else if (player) else
moved = true; moved = true;
if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;; if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;;