diff --git a/doomsday/plugins/common/src/p_map.c b/doomsday/plugins/common/src/p_map.c index b0cea26379..a224e3cb36 100644 --- a/doomsday/plugins/common/src/p_map.c +++ b/doomsday/plugins/common/src/p_map.c @@ -2383,7 +2383,7 @@ static void P_HitSlideLine(linedef_t* ld) side = P_PointOnLinedefSide(slideMo->pos[VX], slideMo->pos[VY], ld); P_GetFloatpv(ld, DMU_DXY, d1); lineAngle = R_PointToAngle2(0, 0, d1[0], d1[1]); - moveAngle = R_PointToAngle2(0, 0, tmMove[MX], tmMove[MY]) + 10; + moveAngle = R_PointToAngle2(0, 0, tmMove[MX], tmMove[MY]); if(side == 1) lineAngle += ANG180; @@ -2511,50 +2511,23 @@ void P_SlideMove(mobj_t* mo) // Move up to the wall. if(bestSlideFrac == 1) - { - // The move must have hit the middle, so stairstep. + { // The move must have hit the middle, so stairstep. $dropoff_fix stairstep: - // $dropoff_fix + /** + * Ideally we would set the directional momentum of the mobj to zero + * here should a move fail (to prevent noticeable stuttering against + * the blocking surface/thing). However due to the mechanics of the + * wall side algorithm this is not possible as it results in highly + * unpredictable behaviour and resulting in the player sling-shoting + * away from the wall. + */ #if __JHEXEN__ if(!P_TryMove(mo, mo->pos[VX], mo->pos[VY] + mo->mom[MY])) - { - if(P_TryMove(mo, mo->pos[VX] + mo->mom[MX], mo->pos[VY])) - { - // If not set to zero, the mobj will appear stuttering against - // the blocking surface/thing. - mo->mom[MY] = 0; - } - else - { - // If not set to zero, the mobj will appear stuttering against - // the blocking surface/thing. - mo->mom[MX] = mo->mom[MY] = 0; - } - } + P_TryMove(mo, mo->pos[VX] + mo->mom[MX], mo->pos[VY]); #else if(!P_TryMove(mo, mo->pos[VX], mo->pos[VY] + mo->mom[MY], true, true)) - { - if(P_TryMove(mo, mo->pos[VX] + mo->mom[MX], mo->pos[VY], true, true)) - { - // If not set to zero, the mobj will appear stuttering against - // the blocking surface/thing. - mo->mom[MY] = 0; - } - else - { - // If not set to zero, the mobj will appear stuttering against - // the blocking surface/thing. - mo->mom[MX] = mo->mom[MY] = 0; - } - } + P_TryMove(mo, mo->pos[VX] + mo->mom[MX], mo->pos[VY], true, true); #endif - else - { - // If not set to zero, the mobj will appear stuttering against - // the blocking surface/thing. - mo->mom[MX] = 0; - } - break; } diff --git a/doomsday/plugins/jdoom/src/p_mobj.c b/doomsday/plugins/jdoom/src/p_mobj.c index fdd48a351b..784e158bfe 100644 --- a/doomsday/plugins/jdoom/src/p_mobj.c +++ b/doomsday/plugins/jdoom/src/p_mobj.c @@ -240,8 +240,8 @@ void P_MobjMoveXY(mobj_t *mo) { pos[VX] = mo->pos[VX] + mom[MX] / 2; pos[VY] = mo->pos[VY] + mom[MY] / 2; - mom[VX] /= 2; - mom[VY] /= 2; + mom[MX] /= 2; + mom[MY] /= 2; } else {