Highlander: Localize global variable
authorWuzzy <Wuzzy2@mail.ru>
Sat, 07 Jul 2018 22:50:08 +0200
changeset 13456 7d69c5605a9d
parent 13455 f38b72d64157
child 13457 2d787d122083
Highlander: Localize global variable
share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Sat Jul 07 22:48:56 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Sat Jul 07 22:50:08 2018 +0200
@@ -200,7 +200,7 @@
 		end
 
 		for w,c in pairs(wepArray) do
-			val = getGearValue(gear,w)
+			local val = getGearValue(gear,w)
 			if val ~= 0 and (multiUse or (wepArray[w] ~= 9 and getGearValue(CurrentHedgehog, w) == 0))  then
 				setGearValue(CurrentHedgehog, w, val)