share/hedgewars/Data/Scripts/Multiplayer/No_Jumping.lua
author Wuzzy <almikes@aol.com>
Sun, 15 Oct 2017 12:30:31 +0200
changeset 12708 6726d5edfdfb
parent 8043 da083f8d95e6
permissions -rw-r--r--
Loyal Highlander: loyal=true in Highlander script param, you only get stuff for *enemy* kills Normal Highlander is of course not affected by this. This setting is optional.

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

HedgewarsScriptLoad("/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