X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fanticheat.qc;h=33c82913116b2b350ba1ff0ea1c3917a09da76df;hp=6207f549bbc45c94c7288f96a967eb9df3b579dd;hb=31bf64ba7821ebb5c0aba8a154472810074ed11e;hpb=f8889850d9dfb4b1d63342b3d7b6079e577084c9 diff --git a/qcsrc/server/anticheat.qc b/qcsrc/server/anticheat.qc index 6207f549bb..33c8291311 100644 --- a/qcsrc/server/anticheat.qc +++ b/qcsrc/server/anticheat.qc @@ -76,8 +76,7 @@ float movement_oddity(vector m0, vector m1) void anticheat_physics() { - float f, wishspeed; - vector wishvel; + float f; // div0_evade -> SPECTATORS makevectors(self.v_angle); @@ -160,52 +159,6 @@ void anticheat_physics() self.anticheat_speedhack_accu = 1; self.anticheat_speedhack_lasttime = servertime; } - - // race/CTS: force kbd movement for fairness - if(g_race || g_cts) - { - // if record times matter - // ensure nothing EVIL is being done (i.e. div0_evade) - // this hinders joystick users though - // but it still gives SOME analog control - wishvel_x = fabs(self.movement_x); - wishvel_y = fabs(self.movement_y); - if(wishvel_x != 0 && wishvel_y != 0 && wishvel_x != wishvel_y) - { - wishvel_z = 0; - wishspeed = vlen(wishvel); - if(wishvel_x >= 2 * wishvel_y) - { - // pure X motion - if(self.movement_x > 0) - self.movement_x = wishspeed; - else - self.movement_x = -wishspeed; - self.movement_y = 0; - } - else if(wishvel_y >= 2 * wishvel_x) - { - // pure Y motion - self.movement_x = 0; - if(self.movement_y > 0) - self.movement_y = wishspeed; - else - self.movement_y = -wishspeed; - } - else - { - // diagonal - if(self.movement_x > 0) - self.movement_x = M_SQRT1_2 * wishspeed; - else - self.movement_x = -M_SQRT1_2 * wishspeed; - if(self.movement_y > 0) - self.movement_y = M_SQRT1_2 * wishspeed; - else - self.movement_y = -M_SQRT1_2 * wishspeed; - } - } - } } void anticheat_spectatecopy(entity spectatee) @@ -237,7 +190,7 @@ void anticheat_report() return; // TODO(divVerent): Use xonstat to acquire good thresholds. GameLogEcho(strcat(":anticheat:_time:", ftos(self.playerid), ":", ftos(servertime - self.anticheat_jointime))); - GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_speedhack), 240, 0.25, 0.4))); + GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_speedhack), 240, 0, 9999))); // Actually this one seems broken. GameLogEcho(strcat(":anticheat:speedhack_m1:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_speedhack_m1), 240, 1.01, 1.25))); GameLogEcho(strcat(":anticheat:speedhack_m2:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_speedhack_m2), 240, 1.01, 1.25))); GameLogEcho(strcat(":anticheat:speedhack_m3:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_speedhack_m3), 240, 1.01, 1.25)));