share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua
changeset 5571 434ec40070e0
parent 5325 261b79ba22b1
child 5827 a416f1070fdf
equal deleted inserted replaced
5570:a1eb7555f439 5571:434ec40070e0
     2 -- NO JUMPING
     2 -- NO JUMPING
     3 --------------------------------
     3 --------------------------------
     4 
     4 
     5 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
     5 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
     6 
     6 
       
     7 local specialGear = nil
       
     8 
     7 function onGameInit()
     9 function onGameInit()
     8     Goals = loc("Jumping is disabled")
    10     Goals = loc("Jumping is disabled")
     9 end
    11 end
    10 
       
    11 --function onGameStart()
       
    12 --	ShowMission(LOC_NOT("NO JUMPING"), LOC_NOT("- Jumping is disabled"), LOC_NOT("Good luck out there!"), 0, 0)
       
    13 --end
       
    14 
    12 
    15 function onNewTurn()
    13 function onNewTurn()
    16 	SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
    14 	SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
    17 end
    15 end
    18 
    16 
       
    17 function onGearAdd(gear)
       
    18 	
       
    19 	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
       
    20 		specialGear = gear
       
    21 		SetInputMask(band(0xFFFFFFFF, bnot(gmHJump)))
       
    22 	end
    19 
    23 
       
    24 end
    20 
    25 
       
    26 function onGearDelete(gear)
       
    27 
       
    28 	if (GetGearType(gear) == gtJetpack) or (GetGearType(gear) == gtRope) or (GetGearType(gear) == gtParachute) then
       
    29 		specialGear = nil
       
    30 		SetInputMask(band(0xFFFFFFFF, bnot(gmLJump + gmHJump)))
       
    31 	end
       
    32 
       
    33 end
       
    34