]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/anticheat.qc
Merge remote branch 'origin/terencehill/small_cleanup'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / anticheat.qc
index 3b729ca48c85e4251f1ac0181485431eea95c1d1..1da6ad3ec6732043e3ad6abcd755b5d2993990e5 100644 (file)
@@ -70,11 +70,11 @@ void anticheat_physics()
                MEAN_ACCUMULATE(anticheat_div0_evade, 1 - (self.anticheat_div0_evade_forward_initial * v_forward), 1);
        }
 
-       MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), max(0, 0.05 - frametime));
+       MEAN_ACCUMULATE(anticheat_div0_strafebot_old, movement_oddity(self.movement, self.anticheat_div0_strafebot_movement_prev), max(0, sys_frametime - frametime));
        self.anticheat_div0_strafebot_movement_prev = self.movement;
 
        if(vlen(self.anticheat_div0_strafebot_forward_prev))
-               MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 1 - (self.anticheat_div0_strafebot_forward_prev * v_forward), max(0, 0.05 - frametime));
+               MEAN_ACCUMULATE(anticheat_div0_strafebot_new, 1 - (self.anticheat_div0_strafebot_forward_prev * v_forward), max(0, sys_frametime - frametime));
        self.anticheat_div0_strafebot_forward_prev = v_forward;
 
        // generic speedhack detection: correlate anticheat_speedhack_movetime (UPDATED BEFORE THIS) and server time
@@ -153,7 +153,7 @@ void anticheat_prethink()
 
 void anticheat_report()
 {
-       if(!cvar("sv_eventlog"))
+       if(!autocvar_sv_eventlog)
                return;
        GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_speedhack))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_old:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_old))));