Racer: Don't mess with ammo display when touching waypoint
authorWuzzy <almikes@aol.com>
Wed, 13 Apr 2016 14:00:03 +0200
changeset 11930 7123bfc9643c
parent 11929 ce277e51b603
child 11931 ace20b1d8d53
Racer: Don't mess with ammo display when touching waypoint
share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Wed Apr 13 13:59:20 2016 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Wed Apr 13 14:00:03 2016 +0200
@@ -280,7 +280,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])
 
@@ -291,7 +290,10 @@
                                 end
                         end
 
-                        AddCaption(string.format(loc("Waypoints remaining: %d"), wpRem),0xffba00ff,capgrpAmmoinfo)
+                        if wpActive[i] == false then
+                                AddCaption(string.format(loc("Waypoints remaining: %d"), wpRem-1),0xffba00ff,capgrpGameState)
+                        end
+                        wpActive[i] = true
 
                 end