diff --git a/src/p_map.c b/src/p_map.c index 1f2d903e8..245736056 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1970,8 +1970,12 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) } // Ramp test - if (thing->player && maxstep > 0 - && !(P_PlayerTouchingSectorSpecial(thing->player, 1, 14) || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)) + if (maxstep > 0 && !( + 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 // step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more. diff --git a/src/p_mobj.c b/src/p_mobj.c index 62dee0a67..e1a1820af 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1650,8 +1650,6 @@ void P_XYMovement(mobj_t *mo) I_Assert(mo != NULL); I_Assert(!P_MobjWasRemoved(mo)); - moved = true; - // if it's stopped 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)) { // blocked move + moved = false; if (player) { - moved = false; if (player->bot) B_MoveBlocked(player); } @@ -1815,7 +1813,7 @@ void P_XYMovement(mobj_t *mo) else mo->momx = mo->momy = 0; } - else if (player) + else moved = true; if (P_MobjWasRemoved(mo)) // MF_SPECIAL touched a player! O_o;; @@ -2375,6 +2373,12 @@ static boolean P_ZMovement(mobj_t *mo) mo->z = mo->floorz; #ifdef ESLOPE + if (mo->standingslope) // You're still on the ground; why are we here? + { + mo->momz = 0; + return true; + } + P_CheckPosition(mo, mo->x, mo->y); // Sets mo->standingslope correctly if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM)) {