From e7c68fbeea9b0f93bc7b5bcb87bb58dfb9e07fd7 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 30 Jan 2025 13:25:12 +0100 Subject: [PATCH] partly revert this some of those "mightve" been changed at the point of the check --- src/p_floor.c | 2 +- src/p_map.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/p_floor.c b/src/p_floor.c index 87a046736..9a09b2cc4 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2249,7 +2249,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime) continue; if (!(players[i].mo->subsector->sector == sec - || P_PlayerTouchingSectorSpecial(&players[i], 2, secspecial) == sec)) + || P_PlayerTouchingSectorSpecial(&players[i], 2, GETSECSPECIAL(sec->special, 2)) == sec)) continue; if (floortouch == true && P_IsObjectOnRealGround(players[i].mo, sec)) diff --git a/src/p_map.c b/src/p_map.c index a7d4497dc..d256f980b 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2409,10 +2409,11 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) { //All things are affected by their scale. fixed_t maxstep = FixedMul(MAXSTEPMOVE, mapobjectscale); - const INT32 secspecial = (thing->player) ? GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) : 0; if (thing->player) { + const INT32 secspecial = GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1); + // If using type Section1:13, double the maxstep. if (P_PlayerTouchingSectorSpecial(thing->player, 1, 13) || secspecial == 13) @@ -2465,7 +2466,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) else if (maxstep > 0 && !( thing->player && ( P_PlayerTouchingSectorSpecial(thing->player, 1, 14) - || secspecial == 14) + || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14) )) // Step down { // If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS