mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 04:09:42 +00:00
Lock actiovation when the game is paused; Lock movement controls when UI is opened.
This commit is contained in:
parent
b818414d82
commit
b4c8b8308f
2 changed files with 6 additions and 2 deletions
|
@ -23,6 +23,9 @@ local handlersPerType = {}
|
|||
handlersPerType[types.ESM4Door] = { ESM4DoorActivation }
|
||||
|
||||
local function onActivate(obj, actor)
|
||||
if world.isWorldPaused() then
|
||||
return
|
||||
end
|
||||
local handlers = handlersPerObject[obj.id]
|
||||
if handlers then
|
||||
for i = #handlers, 1, -1 do
|
||||
|
|
|
@ -107,7 +107,8 @@ local function processAttacking()
|
|||
end
|
||||
|
||||
local function onFrame(dt)
|
||||
local controlsAllowed = input.getControlSwitch(input.CONTROL_SWITCH.Controls) and not core.isWorldPaused()
|
||||
local controlsAllowed = input.getControlSwitch(input.CONTROL_SWITCH.Controls)
|
||||
and not core.isWorldPaused() and not I.UI.getMode()
|
||||
if not movementControlsOverridden then
|
||||
if controlsAllowed then
|
||||
processMovement()
|
||||
|
@ -165,7 +166,7 @@ local function onInputAction(action)
|
|||
end
|
||||
end
|
||||
|
||||
if core.isWorldPaused() then
|
||||
if core.isWorldPaused() or I.UI.getMode() then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue