Fix players constantly JUSTHITFLOOR at the top of slopes

This commit is contained in:
Alug committed 2024-03-01 20:29:18 +01:00
1 parent 332369a910
commit 5b7720fe65
1 file changed
+4 -2
+4 -2
View File
@@ -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);
}