]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
anticheat: also print the time the player was in the game
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 28 Dec 2010 18:34:45 +0000 (19:34 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 28 Dec 2010 18:34:45 +0000 (19:34 +0100)
qcsrc/server/anticheat.qc

index 1da6ad3ec6732043e3ad6abcd755b5d2993990e5..7a0eee9ca3c13af52b94ea73eb25983403a9d449 100644 (file)
@@ -1,3 +1,5 @@
+.float anticheat_jointime;
+
 void mean_accumulate(entity e, .float a, .float c, float mean, float value, float weight)
 {
        if(weight == 0)
@@ -155,6 +157,7 @@ void anticheat_report()
 {
        if(!autocvar_sv_eventlog)
                return;
+       GameLogEcho(strcat(":anticheat:_time:", ftos(self.playerid), ":", ftos(servertime - self.anticheat_jointime)));
        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))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_new:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_new))));
@@ -169,6 +172,7 @@ void anticheat_serverframe()
 void anticheat_init()
 {
        self.anticheat_speedhack_offset = 0;
+       self.anticheat_jointime = servertime;
 }
 
 void anticheat_shutdown()