From 12f99b565b91946b77b4899de05c08b6ec3119b8 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 9 Jan 2012 13:23:01 +0100 Subject: [PATCH] properly input velocity to V_CalcRefdef --- qcsrc/csqcmodellib/cl_player.qc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 71fc2f600c..2de165226c 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -138,6 +138,9 @@ void(entity e, float fl) V_CalcRefdef = #640; // DP_CSQC_V_CALCREFDEF void CSQCPlayer_SetCamera() { + vector v0; + v0 = pmove_vel; // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity + if(csqcplayer) { entity oldself; @@ -169,6 +172,9 @@ void CSQCPlayer_SetCamera() // override it back just in case self.view_ofs = '0 0 1' * getstati(STAT_VIEWHEIGHT); + + // set velocity + self.velocity = v0; } else { @@ -176,12 +182,11 @@ void CSQCPlayer_SetCamera() { vector o, v; o = self.origin; - v = pmove_vel; // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity csqcplayer_status = CSQCPLAYERSTATUS_PREDICTED; CSQCPlayer_PredictTo(servercommandframe + 1); CSQCPlayer_SetPredictionError(o - self.origin); self.origin = o; - self.velocity = v; + self.velocity = v0; // get crouch state from the server if(getstati(STAT_VIEWHEIGHT) == PL_VIEW_OFS_z) -- 2.39.2