mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +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
|
||||
|
||||
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()
|
||||
return Player.getControlSwitch(self, Player.CONTROL_SWITCH.Controls) and not uiControlsOverridden
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user