# HG changeset patch # User mikade # Date 1313422194 -7200 # Node ID 434ec40070e00eac46663e1d617c2cf27f6a038c # Parent a1eb7555f4399a7dfaeea39b25823fcf488a01d7 Allow user to drop bombs off rope, parachute, and flying saucer. diff -r a1eb7555f439 -r 434ec40070e0 share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua Mon Aug 15 10:16:18 2011 -0400 +++ b/share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua Mon Aug 15 17:29:54 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 +