X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fanticheat.qc;h=7e8e5066020e19df88acccd737838c93184a6b63;hp=4e794cb3fc361e7796c98fb66d80b2daae4f4525;hb=c05104bde1e758c4022f9755f02f177aa0476134;hpb=64f2b309aa5be8aafb9ad2137174bb6d99aeb876 diff --git a/qcsrc/server/anticheat.qc b/qcsrc/server/anticheat.qc index 4e794cb3f..7e8e50660 100644 --- a/qcsrc/server/anticheat.qc +++ b/qcsrc/server/anticheat.qc @@ -2,7 +2,11 @@ #include "antilag.qh" #include "autocvars.qh" -#include "defs.qh" +#include +#include +#include +#include +#include #include "miscfunctions.qh" #include "command/common.qh" @@ -81,8 +85,8 @@ void anticheat_physics(entity this) MEAN_ACCUMULATE(CS(this), anticheat_div0_evade, 0.5 - 0.5 * (CS(this).anticheat_div0_evade_forward_initial * v_forward), 1); } - MEAN_ACCUMULATE(CS(this), anticheat_div0_strafebot_old, movement_oddity(this.movement, CS(this).anticheat_div0_strafebot_movement_prev), 1); - CS(this).anticheat_div0_strafebot_movement_prev = this.movement; + MEAN_ACCUMULATE(CS(this), anticheat_div0_strafebot_old, movement_oddity(CS(this).movement, CS(this).anticheat_div0_strafebot_movement_prev), 1); + CS(this).anticheat_div0_strafebot_movement_prev = CS(this).movement; // Note: this actually tries to detect snap-aim. if(CS(this).anticheat_div0_strafebot_forward_prev && time > CS(this).anticheat_fixangle_endtime) { @@ -202,9 +206,10 @@ void anticheat_report_to_eventlog(entity this) { } void anticheat_report_to_playerstats(entity this) { - PS_GR_P_ADDVAL(this, strcat(PLAYERSTATS_ANTICHEAT, "_time"), servertime - CS(this).anticheat_jointime); + PlayerStats_GameReport_Event_Player(this, + strcat(PLAYERSTATS_ANTICHEAT, "_time"), servertime - CS(this).anticheat_jointime); #define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) \ - PS_GR_P_ADDVAL(this, strcat(PLAYERSTATS_ANTICHEAT, name), f) + PlayerStats_GameReport_Event_Player(this, strcat(PLAYERSTATS_ANTICHEAT, name), f) ANTICHEATS(ANTICHEAT_REPORT_ONE); #undef ANTICHEAT_REPORT_ONE }