TechRacer: Don't mess with ammo caption while in waypoint.
authorWuzzy <almikes@aol.com>
Wed, 13 Apr 2016 13:14:01 +0200
changeset 11938 20b755da986f
parent 11937 f1c7dba0f316
child 11939 c17e5ac9f76d
TechRacer: Don't mess with ammo caption while in waypoint. Fixes Google Code issue #883.
share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Wed Apr 13 13:13:07 2016 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Wed Apr 13 13:14:01 2016 +0200
@@ -322,7 +322,6 @@
                 if dist < (NR*NR) then
                 --if dist < (wpRad*wpRad) then
                         --AddCaption("howdy")
-                        wpActive[i] = true
                         wpCol[i] = GetClanColor(GetHogClan(CurrentHedgehog)) -- new                             --GetClanColor(1)
                         SetVisualGearValues(wpCirc[i], wpX[i], wpY[i], 20, 100, 1, 10, 0, wpRad, 5, wpCol[i])
 
@@ -333,7 +332,11 @@
                                 end
                         end
 
-                        AddCaption(string.format(loc("Waypoints remaining: %d"), wpRem),0xffba00ff,capgrpAmmoinfo)
+                        if not wpActive[i] then
+                                AddCaption(string.format(loc("Waypoints remaining: %d"), wpRem),0xffba00ff,capgrpGameState)
+                        end
+
+                        wpActive[i] = true
 
                 end