From 717889751184115744b76d3cf927ccd8a48cad5c Mon Sep 17 00:00:00 2001 From: AlmTech Date: Thu, 31 Oct 2019 13:06:53 +0100 Subject: [PATCH] Minor bug fix --- gamemode/engine/lib/client/cl_cinematic.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gamemode/engine/lib/client/cl_cinematic.lua b/gamemode/engine/lib/client/cl_cinematic.lua index 5593666..fdaa105 100644 --- a/gamemode/engine/lib/client/cl_cinematic.lua +++ b/gamemode/engine/lib/client/cl_cinematic.lua @@ -14,6 +14,8 @@ function Quantum.Client.Cam.Start( scene, fov, velocity, loop ) local time = velocity || 10 -- speed of the camera ( how long till it reaches its finish point ) local scene_index = 1 + local view = {} -- calcview vector data + scene.pos2 = scene.pos2 || scene.pos1 -- if there is no finish pos then make it stay still at starting pos scene.ang2 = scene.ang2 || scene.ang1 @@ -23,12 +25,10 @@ function Quantum.Client.Cam.Start( scene, fov, velocity, loop ) frac = math.Clamp( frac + FrameTime()/velocity, 0, 1 ) if( frac <= 0 ) then return end - local view = { - origin = LerpVector( frac, scene.pos1[scene_index], scene.pos2[scene_index] ), - angles = LerpAngle( frac, scene.ang1[scene_index], scene.ang2[scene_index] ), - fov = fov, - drawviewer = true - } + view.origin = LerpVector( frac, scene.pos1[scene_index], scene.pos2[scene_index] ), + view.angles = LerpAngle( frac, scene.ang1[scene_index], scene.ang2[scene_index] ), + view.fov = fov, + view.drawviewer = true if( view.origin:IsEqualTol( scene.pos2[scene_index], 2 ) ) then frac = 0