share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua
author mikade
Mon, 31 Oct 2011 19:40:39 +0200
changeset 6253 d73317579ae4
parent 5827 a416f1070fdf
child 8043 da083f8d95e6
permissions -rw-r--r--
Add "Surfer" achievement to Space Invasion. Balance "Shield Miser" in Space Invasion. Fix disappearing ghost bug in Racer Extend waypoint limit to 8 in Racer Lengthen ghost tracking interval to improve performance in Racer. Allow users to view score between turns now that HideMission() is fixed.

--------------------------------
-- NO JUMPING
--------------------------------

loadfile(GetDataPath() .. "Scripts/Locale.lua")()

local specialGear = nil

function onGameInit()
    Goals = loc("Jumping is disabled")
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