share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua
changeset 10219 bbeb1e9aaa65
parent 10096 51d6b80ba43c
child 10250 887610b44848
--- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Fri Mar 28 23:04:23 2014 +0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua	Sat Mar 29 13:57:46 2014 -0400
@@ -89,6 +89,7 @@
 
 HedgewarsScriptLoad("/Scripts/Locale.lua")
 HedgewarsScriptLoad("/Scripts/Tracker.lua")
+HedgewarsScriptLoad("/Scripts/Params.lua")
 
 -- These define weps allowed by the script. At present Tardis and Resurrection is banned for example
 -- These were arbitrarily defined out-of-order in initial script, so that was preserved here, resulting 
@@ -132,6 +133,13 @@
 
 local someHog = nil -- just for looking up the weps
 
+local mode = nil
+
+function onParameters()
+    parseParams()
+    mode = params["mode"]
+end
+
 function CheckForWeaponSwap()
 	if GetCurAmmoType() ~= lastWep then
 		shotsFired = 0
@@ -212,7 +220,7 @@
 
         for w,c in pairs(wepArray) do
 			val = getGearValue(gear,w)
-			if val ~= 0 and wepArray[w] ~= 9 and getGearValue(CurrentHedgehog, w) == 0  then
+			if val ~= 0 and (mode == "orig" or (wepArray[w] ~= 9 and getGearValue(CurrentHedgehog, w) == 0))  then
 				setGearValue(CurrentHedgehog, w, val)
 
 				-- if you are using multi-shot weapon, gimme one more