share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
branch0.9.22
changeset 12401 7342f5020691
parent 12367 3e4044f959a9
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Fri Feb 05 11:32:23 2016 +0300
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Mon May 01 13:59:24 2017 +0300
@@ -94,7 +94,7 @@
 local fastY = {}
 local fastCount = 0
 local fastIndex = 0
-local fastColour
+local fastColour = 0xffffffff
 
 local currX = {}
 local currY = {}
@@ -540,7 +540,7 @@
             wpY[wpCount] = y
             wpCol[wpCount] = 0xffffffff
             wpCirc[wpCount] = AddVisualGear(wpX[wpCount],wpY[wpCount],vgtCircle,0,true)
-                                                                                                                                            
+
             SetVisualGearValues(wpCirc[wpCount], wpX[wpCount], wpY[wpCount], 20, 100, 1, 10, 0, wpRad, 5, wpCol[wpCount])
 
             wpCount = wpCount + 1
@@ -551,9 +551,18 @@
 end
 
 function onSpecialPoint(x,y,flag)
-    specialPointsX[specialPointsCount] = x
-    specialPointsY[specialPointsCount] = y
-    specialPointsCount = specialPointsCount + 1
+    if flag == 99 then
+        fastX[fastCount] = x
+        fastY[fastCount] = y
+        fastCount = fastCount + 1
+    else
+        addHashData(x)
+        addHashData(y)
+        addHashData(flag)
+        specialPointsX[specialPointsCount] = x
+        specialPointsY[specialPointsCount] = y
+        specialPointsCount = specialPointsCount + 1
+    end
 end
 
 function onNewTurn()
@@ -743,17 +752,18 @@
 
 function onAttack()
     at = GetCurAmmoType()
-    
+
     usedWeapons[at] = 0
 end
 
 function onAchievementsDeclaration()
     usedWeapons[amSkip] = nil
-    
+    usedWeapons[amExtraTime] = nil
+
     usedRope = usedWeapons[amRope] ~= nil
     usedPortal = usedWeapons[amPortalGun] ~= nil
     usedSaucer = usedWeapons[amJetpack] ~= nil
-    
+
     usedWeapons[amNothing] = nil
     usedWeapons[amRope] = nil
     usedWeapons[amPortalGun] = nil
@@ -775,8 +785,8 @@
         raceType = "mixed race"
     end
 
-    map = detectMap()
-    
+    map = detectMapWithDigest()
+
     for i = 0, (numTeams-1) do
         if teamScore[i] < 100000 then
             DeclareAchievement(raceType, teamNameArr[i], map, teamScore[i])