From 758c77fe53a90a6013801f754bb083c851c99d8c Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Sat, 13 Aug 2016 17:43:22 -0500 Subject: [PATCH 1/3] Fixed non-players having fucked slope stepup/down --- src/p_map.c | 8 ++++++-- src/p_mobj.c | 6 ++---- 2 files changed, 8 insertions(+), 6 deletions(-) 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..77dfd1923 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;; From 55b8ef9f641947d68e6ce40bd7b03f775ed984fd Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Sun, 14 Aug 2016 00:03:00 -0500 Subject: [PATCH 2/3] More stepping upward fixing ugh --- src/p_mobj.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 77dfd1923..1eb503238 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -2373,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; + } + P_CheckPosition(mo, mo->x, mo->y); // Sets mo->standingslope correctly if (((mo->eflags & MFE_VERTICALFLIP) ? tmceilingslope : tmfloorslope) && (mo->type != MT_STEAM)) { From 0264fd24ae541adaa8d261e6ebe4690470c84d00 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 14 Aug 2016 10:43:44 -0400 Subject: [PATCH 3/3] @MonsterIestyn: Should probably be returning true then --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 1eb503238..e1a1820af 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -2376,7 +2376,7 @@ static boolean P_ZMovement(mobj_t *mo) if (mo->standingslope) // You're still on the ground; why are we here? { mo->momz = 0; - return; + return true; } P_CheckPosition(mo, mo->x, mo->y); // Sets mo->standingslope correctly