From: Rudolf Polzer Date: Tue, 3 Jun 2014 19:57:09 +0000 (+0200) Subject: Fix a small math error. X-Git-Tag: xonotic-v0.8.0~212 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cebc7384784b86612f378c9635b4a0deb45f8e95;p=xonotic%2Fxonotic-data.pk3dir.git Fix a small math error. --- diff --git a/qcsrc/server/anticheat.qc b/qcsrc/server/anticheat.qc index 31b5627dd..4e2de0d57 100644 --- a/qcsrc/server/anticheat.qc +++ b/qcsrc/server/anticheat.qc @@ -145,8 +145,9 @@ void anticheat_physics() // new generic speedhack detection if (self.anticheat_speedhack_lasttime > 0) { float dt = time - self.anticheat_speedhack_lasttime; - self.anticheat_speedhack_accu *= exp(-dt / 5); - self.anticheat_speedhack_accu += frametime; + const float falloff = 0.2; + self.anticheat_speedhack_accu *= exp(-dt * f); + self.anticheat_speedhack_accu += frametime * f; self.anticheat_speedhack_lasttime = time; MEAN_ACCUMULATE(anticheat_speedhack_m1, self.anticheat_speedhack_accu, frametime); MEAN_ACCUMULATE(anticheat_speedhack_m2, self.anticheat_speedhack_accu, frametime);