From 2f71cce9c962ab201764c4d339cfa74a613b8adf Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 15 Apr 2018 00:06:04 +0200 Subject: [PATCH] Fix camera behaviour when switching to viewpoint --- src/level/robotmain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 31aee5af..fbd000a1 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -748,7 +748,9 @@ bool CRobotMain::ProcessEvent(Event &event) if (event.type >= EVENT_VIEWPOINT0 && event.type <= EVENT_VIEWPOINT9) { - m_camera->SetScriptCamera(m_viewpoints[event.type - EVENT_VIEWPOINT0].eye, m_viewpoints[event.type - EVENT_VIEWPOINT0].look); + m_camera->SetType(Gfx::CAM_TYPE_SCRIPT); + m_camera->SetSmooth(Gfx::CAM_SMOOTH_HARD); + m_camera->SetScriptCameraAnimate(m_viewpoints[event.type - EVENT_VIEWPOINT0].eye, m_viewpoints[event.type - EVENT_VIEWPOINT0].look); } // Management of the console.