From 99eb742d34434c48c356aa0a7a5575ed96b75971 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 12 Dec 2015 18:24:41 +0000 Subject: [PATCH] HUD distance calculation bug fix. --- src/battle/hud.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle/hud.c b/src/battle/hud.c index 9dc3c22..055f60d 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -350,7 +350,7 @@ static float distanceToKM(int x1, int y1, int x2, int y2) { float distance; - distance = getDistance(player->x, player->y, player->target->x, player->target->y); + distance = getDistance(x1, y1, x2, y2); /* 2px = 1m approx */ distance /= 2;