]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
automatically unset cl_movement_replay
authorRudolf Polzer <divverent@xonotic.org>
Sun, 13 Nov 2011 15:26:08 +0000 (16:26 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 13 Nov 2011 15:26:08 +0000 (16:26 +0100)
qcsrc/client/main.qh
qcsrc/common/csqcplayer.qc

index 58a0bad1969c8dbdaee95fcff27c75390f23a303..2a4147170fa1e7cb1f4e20efabff1c823b1dbb6a 100644 (file)
@@ -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);
index a22777e186ebf928bc7db03094eb913aebca7634..95e50f3ea2dab02663431587d39d349ed9740090 100644 (file)
@@ -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;