From 428511ff1564d7003ba967284c7ea504d38d1d33 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 26 Jun 2011 21:07:01 +0200 Subject: [PATCH] funny feature: cl_lerpexcess 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 | 1 + qcsrc/client/interpolate.qc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index eda2aa7a4..ae87f9a42 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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; diff --git a/qcsrc/client/interpolate.qc b/qcsrc/client/interpolate.qc index f96d3d7f9..3d6a1033a 100644 --- a/qcsrc/client/interpolate.qc +++ b/qcsrc/client/interpolate.qc @@ -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) { -- 2.39.2