From 5b7720fe658ff7a5642762aaac343213328228ef Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 1 Mar 2024 20:29:18 +0100 Subject: [PATCH] Fix players constantly JUSTHITFLOOR at the top of slopes --- src/p_mobj.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 40738ff6d..9266b00ca 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1512,8 +1512,10 @@ void P_XYMovement(mobj_t *mo) FIXED_TO_FLOAT(AngleFixed(oldangle-newangle)) );*/ // Sryder 2018-11-26: Don't launch here if it's a slope without physics, we stick to those like glue anyway - } else if (predictedz-mo->z > abs(slopemom.z/2) - && !(mo->standingslope->flags & SL_NOPHYSICS)) { // Now check if we were supposed to stick to this slope + } else if ((predictedz-mo->z > abs(slopemom.z/2) // Now check if we were supposed to stick to this slope + && !(mo->standingslope->flags & SL_NOPHYSICS) + && (!(mo->eflags & MFE_VERTICALFLIP) && (mo->z <= mo->floorz))) // mo->z <= mo->floorz means 'only do this if we did a stairstep up' + || ((mo->eflags & MFE_VERTICALFLIP) && (mo->z+mo->height >= mo->ceilingz))) { //CONS_Printf("%d-%d > %d\n", (predictedz), (mo->z), (slopemom.z/2)); P_SlopeLaunch(mo); }