share/hedgewars/Data/Maps/TrophyRace/map.lua
changeset 11201 9301550d2566
parent 11180 1750a1ce7131
child 12077 ce3860c82c8b
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua	Mon Oct 05 13:38:25 2015 +0200
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua	Wed Oct 07 23:20:31 2015 +0200
@@ -33,6 +33,7 @@
 local worsthog = nil
 
 local besthog = nil
+local besthogname = ''
 
 -- best time
 local besttime = maxtime + 1
@@ -142,6 +143,7 @@
             if ttime < besttime then
                 besttime = ttime
                 besthog = CurrentHedgehog
+                besthogname = GetHogName(besthog)
                 hscore = hscore .. loc("NEW fastest lap: ")
             else
                 hscore = hscore .. loc("Fastest lap: ")
@@ -150,7 +152,7 @@
                 worsttime = ttime
                 worsthog = CurrentHedgehog
             end
-            hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc("Best laps per team: ")
+            hscore = hscore .. besthogname .. " - " .. (besttime / 1000) .. " s | |" .. loc("Best laps per team: ")
             
             if clan == ClansCount -1 then
                 -- Time for elimination - worst hog is out and the worst hog vars are reset.