From 9d8fcfeeb6563b1b734b8e2c1f3f0210650df9a6 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 7 Oct 2024 21:32:25 +0200 Subject: [PATCH] smol fix --- src/p_map.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index dd924f484..27028ee07 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1699,7 +1699,7 @@ static boolean PIT_CheckLine(line_t *ld) boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) { INT32 xl, xh, yl, yh, bx, by; - subsector_t *newsubsec = thing->subsector; + subsector_t *newsubsec; boolean blockval = true; ps_checkposition_calls.value.i++; @@ -1723,6 +1723,8 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) if (thing->x != x || thing->y != y) newsubsec = R_PointInSubsector(x, y); + else + newsubsec = thing->subsector; ceilingline = blockingline = NULL;