share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
changeset 9483 14ad1ac00ac9
parent 9472 265e5997580e
child 10017 de822cd3df3a
child 10022 eb981a03de90
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Mon Sep 30 13:43:55 2013 -0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Mon Sep 30 22:46:48 2013 +0400
@@ -92,6 +92,10 @@
 local currY = {}
 local currCount = 0
 
+local specialPointsX = {}
+local specialPointsY = {}
+local specialPointsCount = 0
+
 --------------------------
 -- hog and team tracking variales
 --------------------------
@@ -489,6 +493,10 @@
         lastRound = TotalRounds
         RoundHasChanged = false -- true
 
+        for i = 0, (specialPointsCount-1) do
+                PlaceWayPoint(specialPointsX[i], specialPointsY[i])
+        end
+
         RebuildTeamInfo()
 
         ShowMission     (
@@ -501,7 +509,7 @@
                                 "", 4, 4000
                                 )
 
-	TryRepositionHogs()
+        TryRepositionHogs()
 
 end
 
@@ -525,13 +533,15 @@
 end
 
 function onSpecialPoint(x,y,flag)
-    PlaceWayPoint(x,y)
+    specialPointsX[specialPointsCount] = x
+    specialPointsY[specialPointsCount] = y
+    specialPointsCount = specialPointsCount + 1
 end
 
 function onNewTurn()
 
         CheckForNewRound()
-	TryRepositionHogs()
+        TryRepositionHogs()
 
         racerActive = false