]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a small math error.
authorRudolf Polzer <divverent@xonotic.org>
Tue, 3 Jun 2014 19:57:09 +0000 (21:57 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 3 Jun 2014 19:57:09 +0000 (21:57 +0200)
qcsrc/server/anticheat.qc

index 31b5627dd1a29ddcf3f6c1ccd0de35ff87f782f7..4e2de0d572468923f374089247f5db9df4f92308 100644 (file)
@@ -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);