]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
funny feature: cl_lerpexcess
authorRudolf Polzer <divverent@xonotic.org>
Sun, 26 Jun 2011 19:07:01 +0000 (21:07 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 26 Jun 2011 19:07:01 +0000 (21:07 +0200)
Hides the effect of packet loss for linear motion. Mispredicts nonlinear motion, of course. Can be configured to a max number of server packets lost that it will try to compensate for. Of course off by default.

qcsrc/client/autocvars.qh
qcsrc/client/interpolate.qc

index eda2aa7a452dfd343c29f8682e0945217f10e235..ae87f9a429258e197af0c2c4063a3c71f3f5ae11 100644 (file)
@@ -343,3 +343,4 @@ float autocvar_cl_hitsound_antispam_time;
 var float autocvar_cl_eventchase_death = 1;
 var float autocvar_cl_eventchase_distance = 140;
 var float autocvar_cl_eventchase_speed = 1.3;
+float autocvar_cl_lerpexcess;
index f96d3d7f96887ad3246e989bb8de25e18868dca8..3d6a1033a130f86eb62fb420171ad3a851e55677 100644 (file)
@@ -79,7 +79,7 @@ void InterpolateOrigin_Do()
        if(self.itime1 && self.itime2 && self.itime1 != self.itime2)
        {
                float f;
-               f = bound(0, (time - self.itime1) / (self.itime2 - self.itime1), 1);
+               f = bound(0, (time - self.itime1) / (self.itime2 - self.itime1), 1 + autocvar_cl_lerpexcess);
                self.origin = (1 - f) * self.iorigin1 + f * self.iorigin2;
                if(self.iflags & IFLAG_ANGLES)
                {