1
0
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:
Alexei Kotov 2023-12-30 03:23:27 +03:00
parent 01eb333fad
commit 91a01ae1e2

View File

@ -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