X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcsqcmodellib%2Fcl_player.qc;h=dc9627d9e8173fcc86a9c3a45408d71e101f0b6d;hb=e2cdd292127becabc2bbc805d83695713c553781;hp=71fc2f600cd44af355f7ba015ba67165abe8b9fc;hpb=55384b17f6ad8154f79eeeefa17a1be3f060304a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 71fc2f600..dc9627d9e 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -105,6 +105,7 @@ void CSQCPlayer_PredictTo(float endframe) { csqcplayer_moveframe = clientcommandframe; getinputstate(csqcplayer_moveframe-1); + print("the Weird code path got hit\n"); return; } @@ -138,6 +139,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 +173,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 +183,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)