From b411d9803e8e4cf16e52699a053515f8a809c017 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 28 Aug 2019 20:25:56 +1000 Subject: [PATCH] Don't apply the modifications to camera during intermission --- qcsrc/lib/csqcmodel/cl_player.qc | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 09bed99da..095b41ab7 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -565,21 +565,29 @@ void CSQCPlayer_SetCamera() else { vector vieworg = view.origin; - vieworg = CSQCPlayer_ApplySmoothing(view, vieworg); - if(autocvar_chase_active) - vieworg = CSQCPlayer_ApplyChase(view, vieworg); + if(intermission) + { + // just update view offset, don't need to do anything else + vieworg.z += view.view_ofs.z; + } else { - // angles - CSQCPlayer_ApplyDeathTilt(view); - view_angles = view_angles + view_punchangle; - view_angles.z += CSQCPlayer_CalcRoll(view); - // TODO? we don't have damage time accessible here - // origin - vieworg = vieworg + view_punchvector; - vieworg = CSQCPlayer_ApplyBobbing(view, vieworg); + vieworg = CSQCPlayer_ApplySmoothing(view, vieworg); + if(autocvar_chase_active) + vieworg = CSQCPlayer_ApplyChase(view, vieworg); + else + { + // angles + CSQCPlayer_ApplyDeathTilt(view); + view_angles = view_angles + view_punchangle; + view_angles.z += CSQCPlayer_CalcRoll(view); + // TODO? we don't have damage time accessible here + // origin + vieworg = vieworg + view_punchvector; + vieworg = CSQCPlayer_ApplyBobbing(view, vieworg); + } + CSQCPlayer_ApplyIdleScaling(view); } - CSQCPlayer_ApplyIdleScaling(view); setproperty(VF_ORIGIN, vieworg); setproperty(VF_ANGLES, view_angles); } -- 2.39.2