diff --git a/src/p_inter.c b/src/p_inter.c index 9017f795d..70ea1324c 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2482,6 +2482,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget P_UnsetThingPosition(target); target->flags |= MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY; P_SetThingPosition(target); + target->standingslope = NULL; + target->pmomz = 0; if (target->player->powers[pw_super]) { diff --git a/src/p_mobj.c b/src/p_mobj.c index 5735dc27b..ab29926c7 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1861,6 +1861,9 @@ void P_XYMovement(mobj_t *mo) oldy = mo->y; #ifdef ESLOPE + if (mo->flags & MF_NOCLIPHEIGHT) + mo->standingslope = NULL; + // adjust various things based on slope if (mo->standingslope && abs(mo->standingslope->zdelta) > FRACUNIT>>8) { if (!P_IsObjectOnGround(mo)) { // We fell off at some point? Do the twisty thing! @@ -2051,7 +2054,7 @@ void P_XYMovement(mobj_t *mo) return; #ifdef ESLOPE - if (moved && oldslope) { // Check to see if we ran off + if (moved && oldslope && !(mo->flags & MF_NOCLIPHEIGHT)) { // Check to see if we ran off if (oldslope != mo->standingslope) { // First, compare different slopes angle_t oldangle, newangle;