Lua refactor: Replace ParseCommand('setweap… with SetWeapon
authorWuzzy <almikes@aol.com>
Fri, 12 May 2017 17:15:45 +0200
changeset 12416 edeae7661dca
parent 12415 8b971d8944d6
child 12417 ed33ef8a0fc5
Lua refactor: Replace ParseCommand('setweap… with SetWeapon
share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Fri May 12 16:53:29 2017 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Fri May 12 17:15:45 2017 +0200
@@ -904,7 +904,7 @@
 			then
 				AddAmmo(CurrentHedgehog,amSwitch,GetAmmoCount(CurrentHedgehog, amSwitch)+1)
 
-				ParseCommand("setweap " .. string.char(amSwitch))
+				SetWeapon(amSwitch)
 				GLOBAL_TEMP_VALUE=87
 			end
 		end
@@ -1228,7 +1228,7 @@
 function onSlot(slot)
 	if(GLOBAL_TEAM_CONTINENT[GetHogTeamName(CurrentHedgehog)]==0)
 	then
-		ParseCommand("setweap " .. string.char(amSkip))
+		SetWeapon(amSkip)
 	end
 end