From d791d2ce55e320e908266085b5e3f086a362a2b0 Mon Sep 17 00:00:00 2001 From: Indev Date: Wed, 3 Sep 2025 18:51:32 +0300 Subject: [PATCH] Revert "make sure subsec gets initalised to smth" This reverts commit 32d81205167b292fe396ece32562b1e94d85fd90. --- src/p_mobj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index a98dae848..4813ad1e1 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -572,7 +572,7 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t if (sector->f_slope) { fixed_t testx, testy; - static fixed_t oldtestx = INT32_MIN, oldtesty = INT32_MIN; + static fixed_t oldtestx = 0, oldtesty = 0; static subsector_t *subsec = NULL; pslope_t *slope = sector->f_slope; @@ -596,7 +596,7 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t testx += x; testy += y; - if (subsec == NULL || oldtestx != testx || oldtesty != testy) + if (oldtestx != testx || oldtesty != testy) subsec = R_PointInSubsector(testx, testy); oldtestx = testx; @@ -667,7 +667,7 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed if (sector->c_slope) { fixed_t testx, testy; - static fixed_t oldtestx = INT32_MIN, oldtesty = INT32_MIN; + static fixed_t oldtestx = 0, oldtesty = 0; static subsector_t *subsec = NULL; pslope_t *slope = sector->c_slope; @@ -691,7 +691,7 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed testx += x; testy += y; - if (subsec == NULL || oldtestx != testx || oldtesty != testy) + if (oldtestx != testx || oldtesty != testy) subsec = R_PointInSubsector(testx, testy); oldtestx = testx;