mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-25 06:06:49 +00:00
Remove duplicate ToggleWeapon trigger handler registration
This commit is contained in:
parent
01eb333fad
commit
91a01ae1e2
1 changed files with 0 additions and 10 deletions
|
@ -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…
Reference in a new issue