From 9663f0259b04171f5bd951974417f2bb5d3ec66d Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 13 Nov 2011 16:26:08 +0100 Subject: [PATCH] automatically unset cl_movement_replay --- qcsrc/client/main.qh | 2 ++ qcsrc/common/csqcplayer.qc | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 58a0bad19..2a4147170 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -165,3 +165,5 @@ float g_trueaim_minrange; entity entcs_receiver[255]; // 255 is the engine limit on maxclients float hud; + +void cvar_clientsettemp(string cv, string val); diff --git a/qcsrc/common/csqcplayer.qc b/qcsrc/common/csqcplayer.qc index a22777e18..95e50f3ea 100644 --- a/qcsrc/common/csqcplayer.qc +++ b/qcsrc/common/csqcplayer.qc @@ -1,4 +1,5 @@ float autocvar_cl_predictionerrorcompensation = 0; +float autocvar_cl_movement_replay; float autocvar_chase_active; float autocvar_chase_back; @@ -46,7 +47,7 @@ void CSQCPlayer_SavePrediction() csqcplayer_origin = self.origin; csqcplayer_velocity = self.velocity; csqcplayer_sequence = servercommandframe; - csqcplayer_status = CSQCPLAYERSTATUS_FROMSERVER; + csqcplayer_status = CSQCPLAYERSTATUS_PREDICTED; } void CSQCPlayer_PredictTo(float endframe) @@ -97,7 +98,6 @@ void CSQCPlayer_SetCamera() self.origin = o; self.velocity = v; CSQCPlayer_SavePrediction(); - CSQCPlayer_Unpredict(); } CSQCPlayer_PredictTo(clientcommandframe); @@ -127,6 +127,7 @@ float CSQCPlayer_PreUpdate() { if(self.entnum != player_localentnum) return 0; + cvar_clientsettemp("cl_movement_replay", "0"); if(csqcplayer_status != CSQCPLAYERSTATUS_FROMSERVER) CSQCPlayer_Unpredict(); return 1; -- 2.39.2