From: Rudolf Polzer Date: Mon, 9 Jan 2012 12:23:01 +0000 (+0100) Subject: properly input velocity to V_CalcRefdef X-Git-Tag: xonotic-v0.6.0~188^2~15 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=12f99b565b91946b77b4899de05c08b6ec3119b8 properly input velocity to V_CalcRefdef --- 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)