--- 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
+