merge
authormikade
Mon, 15 Aug 2011 19:42:39 +0200
changeset 5575 41ee1c71deb3
parent 5571 434ec40070e0 (diff)
parent 5574 3d7438991ed8 (current diff)
child 5576 bf30c60786a5
child 5577 272c82f82cee
merge
--- a/share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua	Mon Aug 15 12:47:53 2011 -0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua	Mon Aug 15 19:42:39 2011 +0200
@@ -4,17 +4,31 @@
 
 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
 
+local specialGear = nil
+
 function onGameInit()
     Goals = loc("Jumping is disabled")
 end
 
---function onGameStart()
---	ShowMission(LOC_NOT("NO JUMPING"), LOC_NOT("- Jumping is disabled"), LOC_NOT("Good luck out there!"), 0, 0)
---end
-
 function onNewTurn()
 	SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
 end
 
+function onGearAdd(gear)
+	
+	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
+		specialGear = gear
+		SetInputMask(band(0xFFFFFFFF, bnot(gmHJump)))
+	end
 
+end
 
+function onGearDelete(gear)
+
+	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
+		specialGear = nil
+		SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
+	end
+
+end
+