1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-11 15:40:39 +00:00

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

This commit is contained in:
Petr Mikheev 2022-06-30 11:25:36 +02:00
parent 066575821b
commit 466fc559f4

View File

@ -59,7 +59,12 @@ function M.onFrame(dt)
end
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
and I.Camera.getBaseThirdPersonDistance() == 30 then
self.controls.yawChange = camera.getYaw() - self.rotation.z