From 77feee73c36085180db713871098f1917fdf1f3d Mon Sep 17 00:00:00 2001 From: Lachlan Wright Date: Sat, 27 Feb 2021 03:38:13 +0000 Subject: [PATCH] Revert "Merge branch 'player-speed' into 'next'" This reverts merge request !1309 --- src/p_enemy.c | 2 +- src/p_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 3e7f52a3f..12bba0b4d 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -1834,7 +1834,7 @@ void A_SnailerThink(mobj_t *actor) fixed_t dist; fixed_t dx, dy; - dist = R_PointToDist2(0, 0, actor->x - actor->target->x, actor->y - actor->target->y); + dist = P_AproxDistance(actor->x - actor->target->x, actor->y - actor->target->y); if (an > ANGLE_45 && an <= ANGLE_90) // fire at 45 degrees to the left { diff --git a/src/p_user.c b/src/p_user.c index a9e1fe9a2..b3b337572 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -5924,7 +5924,7 @@ static void P_3dMovement(player_t *player) player->rmomy = player->mo->momy - player->cmomy; // Calculates player's speed based on distance-of-a-line formula - player->speed = R_PointToDist2(0, 0, player->rmomx, player->rmomy); + player->speed = P_AproxDistance(player->rmomx, player->rmomy); // Monster Iestyn - 04-11-13 // Quadrants are stupid, excessive and broken, let's do this a much simpler way!