1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 21:15:36 +00:00

Merge branch 'move360_fix' into 'master'

Fix move360.lua switching to 3rd person view when it shouldn't

See merge request OpenMW/openmw!2065
This commit is contained in:
psi29a 2022-06-30 10:46:18 +00:00
commit 28172c33ca

View file

@ -59,7 +59,12 @@ function M.onFrame(dt)
end end
function M.onInputAction(action) function M.onInputAction(action)
if not active or core.isWorldPaused() then return end if not active or core.isWorldPaused() or
not input.getControlSwitch(input.CONTROL_SWITCH.ViewMode) or
not input.getControlSwitch(input.CONTROL_SWITCH.Controls) or
not I.Camera.isModeControlEnabled() then
return
end
if action == input.ACTION.ZoomIn and camera.getMode() == MODE.Preview if action == input.ACTION.ZoomIn and camera.getMode() == MODE.Preview
and I.Camera.getBaseThirdPersonDistance() == 30 then and I.Camera.getBaseThirdPersonDistance() == 30 then
self.controls.yawChange = camera.getYaw() - self.rotation.z self.controls.yawChange = camera.getYaw() - self.rotation.z