mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 08:42:23 +00:00
Remove duplicate ToggleWeapon trigger handler registration
This commit is contained in:
parent
01eb333fad
commit
91a01ae1e2
@ -208,16 +208,6 @@ end
|
|||||||
|
|
||||||
local uiControlsOverridden = false
|
local uiControlsOverridden = false
|
||||||
|
|
||||||
input.registerTriggerHandler('ToggleWeapon', async:callback(function()
|
|
||||||
if not combatAllowed() then return end
|
|
||||||
if Actor.stance(self) == Actor.STANCE.Weapon then
|
|
||||||
Actor.setStance(self, Actor.STANCE.Nothing)
|
|
||||||
elseif Player.getControlSwitch(self, Player.CONTROL_SWITCH.Fighting) then
|
|
||||||
Actor.setStance(self, Actor.STANCE.Weapon)
|
|
||||||
end
|
|
||||||
end))
|
|
||||||
|
|
||||||
|
|
||||||
local function uiAllowed()
|
local function uiAllowed()
|
||||||
return Player.getControlSwitch(self, Player.CONTROL_SWITCH.Controls) and not uiControlsOverridden
|
return Player.getControlSwitch(self, Player.CONTROL_SWITCH.Controls) and not uiControlsOverridden
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user