if(self.anticheat_div0_evade_offset == 0)
{
f = fabs(anticheat_div0_evade_evasion_delta - floor(anticheat_div0_evade_evasion_delta) - 0.5) * 2; // triangle function
- self.anticheat_div0_evade_offset = time + sys_frametime * (3 * f - 1);
+ self.anticheat_div0_evade_offset = servertime + sys_frametime * (3 * f - 1);
self.anticheat_div0_evade_v_angle = self.v_angle;
self.anticheat_div0_evade_forward_initial = v_forward;
MEAN_ACCUMULATE(anticheat_div0_evade, 0, 1);
// new generic speedhack detection
if (self.anticheat_speedhack_lasttime > 0) {
- float dt = time - self.anticheat_speedhack_lasttime;
+ float dt = servertime - self.anticheat_speedhack_lasttime;
const float falloff = 0.2;
self.anticheat_speedhack_accu *= exp(-dt * falloff);
self.anticheat_speedhack_accu += frametime * falloff;
// NOTE: at cl_netfps x, this actually averages not to 1, but to 1/x * falloff / (1 - exp(-1/x * falloff))
// For 15 netfps (absolute minimum bearable), and 0.2 falloff, this is: 1.0067
- self.anticheat_speedhack_lasttime = time;
+ self.anticheat_speedhack_lasttime = servertime;
MEAN_ACCUMULATE(anticheat_speedhack_m1, self.anticheat_speedhack_accu, frametime);
MEAN_ACCUMULATE(anticheat_speedhack_m2, self.anticheat_speedhack_accu, frametime);
MEAN_ACCUMULATE(anticheat_speedhack_m3, self.anticheat_speedhack_accu, frametime);
MEAN_ACCUMULATE(anticheat_speedhack_m5, self.anticheat_speedhack_accu, frametime);
} else {
self.anticheat_speedhack_accu = 1;
- self.anticheat_speedhack_lasttime = time;
+ self.anticheat_speedhack_lasttime = servertime;
}
// race/CTS: force kbd movement for fairness