From c137ef1fdeb1db50f1f418a86982844b9c0ba2be Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 3 May 2016 15:40:23 +0100 Subject: [PATCH] Show speak distance info on hud. --- src/battle/hud.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/battle/hud.c b/src/battle/hud.c index d1f1943..c6f3050 100644 --- a/src/battle/hud.c +++ b/src/battle/hud.c @@ -515,6 +515,15 @@ static void drawDistancesInfo(void) y += 25; } + + if (battle.messageSpeaker) + { + distance = distanceToKM(player->x, player->y, battle.messageSpeaker->x, battle.messageSpeaker->y); + + drawText(SCREEN_WIDTH - 15, y, 14, TA_RIGHT, colors.white, "%s: %.2fkm", battle.messageSpeaker->name, distance); + + y += 25; + } } static void drawHudMessages(void)