Racer, TechRacer: Change waypoint opacity on victory or failure
authorWuzzy <Wuzzy2@mail.ru>
Sat, 10 Feb 2018 19:30:51 +0100
changeset 12968 544c4302efe4
parent 12967 52c12029c7bd
child 12969 a5c5fe878a4e
Racer, TechRacer: Change waypoint opacity on victory or failure
share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Sat Feb 10 18:03:12 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Sat Feb 10 19:30:51 2018 +0100
@@ -512,6 +512,16 @@
                         EndTurn(true)
                 end
                 racerActive = false -- newadd
+
+		if trackFinished and not turnSkipped then
+                         for i=0, wpCount-1 do
+                       	         SetVisualGearValues(wpCirc[i], nil, nil, 255, 255, nil, 2)
+                         end
+                elseif not turnSkipped then
+                         for i=0, wpCount-1 do
+                       	         SetVisualGearValues(wpCirc[i], nil, nil, 32, 32, nil, 1)
+                         end
+                end
         end
 end
 
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Sat Feb 10 18:03:12 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Sat Feb 10 19:30:51 2018 +0100
@@ -578,6 +578,15 @@
                 if endTurn then
                          EndTurn(true)
                 end
+		if trackFinished then
+                         for i=0, wpCount-1 do
+                       	         SetVisualGearValues(wpCirc[i], nil, nil, 255, 255, nil, 2)
+                         end
+                else
+                         for i=0, wpCount-1 do
+                       	         SetVisualGearValues(wpCirc[i], nil, nil, 32, 32, nil, 1)
+                         end
+                end
         end
 end