diff --git a/src/p_map.c b/src/p_map.c index 612f15220..7ed28751f 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1969,22 +1969,28 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height; thing->eflags |= MFE_JUSTSTEPPEDDOWN; } - else if (tmceilingz < thingtop && thingtop - tmceilingz <= maxstep) +#ifdef ESLOPE + // HACK TO FIX DSZ2: apply only if slopes are involved + else if (tmceilingslope && tmceilingz < thingtop && thingtop - tmceilingz <= maxstep) { thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height; thing->eflags |= MFE_JUSTSTEPPEDDOWN; } +#endif } else if (thing->z == thing->floorz && tmfloorz < thing->z && thing->z - tmfloorz <= maxstep) { thing->z = thing->floorz = tmfloorz; thing->eflags |= MFE_JUSTSTEPPEDDOWN; } - else if (tmfloorz > thing->z && tmfloorz - thing->z <= maxstep) +#ifdef ESLOPE + // HACK TO FIX DSZ2: apply only if slopes are involved + else if (tmfloorslope && tmfloorz > thing->z && tmfloorz - thing->z <= maxstep) { thing->z = thing->floorz = tmfloorz; thing->eflags |= MFE_JUSTSTEPPEDDOWN; } +#endif } if (thing->eflags & MFE_VERTICALFLIP)