From: Rudolf Polzer Date: Sun, 13 Nov 2011 15:26:08 +0000 (+0100) Subject: automatically unset cl_movement_replay X-Git-Tag: xonotic-v0.6.0~74^2~100^2~92 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9663f0259b04171f5bd951974417f2bb5d3ec66d;p=xonotic%2Fxonotic-data.pk3dir.git automatically unset cl_movement_replay --- 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;