hopefully fix some placements
authormikade <redgrinner@gmail.com>
Wed, 13 May 2015 23:01:00 +0900
changeset 10945 2570fcfddf2a
parent 10944 c4b3440eeac6
child 10946 c6cf08ee999e
hopefully fix some placements
share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Tue May 12 22:38:33 2015 +0300
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Wed May 13 23:01:00 2015 +0900
@@ -729,11 +729,12 @@
 		-- There are about 58+- weps / utils
 		-- Weapon Crates
 		elseif (specialPointsFlag[i] >= 20) and (specialPointsFlag[i] < (#atkArray+20)) then
-			SpawnAmmoCrate(specialPointsX[i],specialPointsY[i],atkArray[i-19][1])
+			SpawnAmmoCrate(specialPointsX[i],specialPointsY[i],atkArray[specialPointsFlag[i]-19][1])
+
 
 		-- Utility Crates
 		elseif (specialPointsFlag[i] >= (#atkArray+20)) and (specialPointsFlag[i] < (#atkArray+20+#utilArray)) then
-			SpawnUtilityCrateCrate(specialPointsX[i],specialPointsY[i],utilArray[i-19-#atkArray][1])
+			SpawnUtilityCrate(specialPointsX[i],specialPointsY[i],utilArray[specialPointsFlag[i]-19-#atkArray][1])
 
 		--79-82 (reserved for future wep crates)
 		--89,88,87,86 and 85,84,83,82 (reserved for the 2 custom sprites and their landflags)