1
0
Fork 0
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:
Petr Mikheev 2023-09-03 02:43:55 +02:00
parent b818414d82
commit b4c8b8308f
2 changed files with 6 additions and 2 deletions

View file

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

View file

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