HedgeEditor: Fix maximum ammos sprite ID being 1 too low
authorWuzzy <almikes@aol.com>
Sun, 23 Apr 2017 04:47:13 +0200
changeset 12315 a2049a645e29
parent 12314 6b34067a6344
child 12316 1b5a4807f8f4
HedgeEditor: Fix maximum ammos sprite ID being 1 too low
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Sun Apr 23 00:21:11 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Sun Apr 23 04:47:13 2017 +0200
@@ -577,12 +577,8 @@
   sprSpeechCorner, sprSpeechEdge, sprSpeechTail, sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
   sprShoutCorner, sprShoutEdge, sprShoutTail, sprCustom1, sprCustom2, }
 
- local reducedSpriteIDArrayFrames = {
-  4, 8, 1, 1, 1,
-  57, 57, 3, 4, 8, 1,
-  1, 1, 1, 1, 1, 1,
-  1, 1, 1, 1, 1,
- }
+ -- Set in onGameInit
+ local reducedSpriteIDArrayFrames
 
  local reducedSpriteTextArray = {
   "sprAmRubber", "sprAmGirder", "sprTargetBee", "sprIceTexture", "sprHHTelepMask",
@@ -3367,6 +3363,13 @@
 		end
 	end
 
+	reducedSpriteIDArrayFrames = {
+		4, 8, 1, 1, 1,
+		AmmoTypeMax, AmmoTypeMax, 3, 4, 8, 1,
+		1, 1, 1, 1, 1, 1,
+		1, 1, 1, 1, 1,
+	}
+
 	Explosives = 0
 	MinesNum = 0