From 3735ff2eb07102d0ab397cd8a06d7e1b25cdb7c7 Mon Sep 17 00:00:00 2001 From: Wumbo <58399748+WumboSpasm@users.noreply.github.com> Date: Sun, 8 Sep 2024 18:26:36 -0400 Subject: [PATCH] Fix buggy monitor collision in Kart Airlines and remove unused variables --- src/p_map.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index d112577b7..c81946a21 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2396,7 +2396,7 @@ increment_move fixed_t tryx = thing->x; fixed_t tryy = thing->y; fixed_t radius = thing->radius; - fixed_t thingtop; + fixed_t thingtop = thing->z + thing->height; floatok = false; // reset this to 0 at the start of each trymove call as it's only used here @@ -2454,15 +2454,10 @@ increment_move if (maxstep > 0) { - const boolean flipped = - (thing->eflags & MFE_VERTICALFLIP) != 0; - - thingtop = thing->z + thing->height; - // Step up if (thing->z < tmfloorz) { - if (tmfloorstep <= maxstep) + if (tmfloorz - thing->z <= maxstep) { thing->z = thing->floorz = tmfloorz; thing->floorrover = tmfloorrover; @@ -2475,7 +2470,7 @@ increment_move } else if (tmceilingz < thingtop) { - if (tmceilingstep <= maxstep) + if (thingtop - tmceilingz <= maxstep) { thing->z = ( thing->ceilingz = tmceilingz ) - thing->height; thing->ceilingrover = tmceilingrover; @@ -2553,8 +2548,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) fixed_t oldx = thing->x; fixed_t oldy = thing->y; fixed_t startingonground = P_IsObjectOnGround(thing); - fixed_t stairjank = 0; - pslope_t *oldslope = thing->standingslope; // The move is ok! if (!increment_move(thing, x, y, allowdropoff))