mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 12:01:51 +00:00
Update camera logic related to paused game / opened UI
This commit is contained in:
parent
23a7661d0b
commit
65cd518b44
@ -138,14 +138,12 @@ namespace MWRender
|
||||
if (mProcessViewChange)
|
||||
processViewChange();
|
||||
|
||||
if (paused)
|
||||
return;
|
||||
|
||||
// only show the crosshair in game mode
|
||||
MWBase::WindowManager* wm = MWBase::Environment::get().getWindowManager();
|
||||
wm->showCrosshair(!wm->isGuiMode() && mShowCrosshair);
|
||||
|
||||
updateFocalPointOffset(duration);
|
||||
if (!paused)
|
||||
updateFocalPointOffset(duration);
|
||||
updatePosition();
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ local util = require('openmw.util')
|
||||
local self = require('openmw.self')
|
||||
local nearby = require('openmw.nearby')
|
||||
local async = require('openmw.async')
|
||||
local I = require('openmw.interfaces')
|
||||
|
||||
local Actor = require('openmw.types').Actor
|
||||
|
||||
@ -189,7 +190,7 @@ local function updateIdleTimer(dt)
|
||||
end
|
||||
|
||||
local function onFrame(dt)
|
||||
if core.isWorldPaused() then return end
|
||||
if core.isWorldPaused() or I.UI.getMode() then return end
|
||||
updateIdleTimer(dt)
|
||||
local mode = camera.getMode()
|
||||
if (mode == MODE.FirstPerson or mode == MODE.ThirdPerson) and not camera.getQueuedMode() then
|
||||
@ -273,7 +274,7 @@ return {
|
||||
onUpdate = onUpdate,
|
||||
onFrame = onFrame,
|
||||
onInputAction = function(action)
|
||||
if core.isWorldPaused() then return end
|
||||
if core.isWorldPaused() or I.UI.getMode() then return end
|
||||
if action == input.ACTION.ZoomIn then
|
||||
zoom(10)
|
||||
elseif action == input.ACTION.ZoomOut then
|
||||
|
Loading…
Reference in New Issue
Block a user