mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 06:36:39 +00:00
Merge branch 'playercontrols' into 'master'
Remove duplicate ToggleWeapon trigger handler registration See merge request OpenMW/openmw!3705
This commit is contained in:
commit
c23858bf1c
1 changed files with 0 additions and 10 deletions
|
@ -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…
Reference in a new issue