60 return 0.5 - 0.5 *
cos(cosangle * cosangle * 4 *
M_PI);
74 CS(
this).anticheat_div0_evade_v_angle = this.
v_angle;
75 CS(
this).anticheat_div0_evade_forward_initial =
v_forward;
81 CS(
this).anticheat_div0_evade_v_angle = this.
v_angle;
86 CS(
this).anticheat_div0_strafebot_movement_prev =
CS(
this).movement;
90 float cosangle =
CS(
this).anticheat_div0_strafebot_forward_prev *
v_forward;
91 float angle = cosangle < -1 ?
M_PI : cosangle > 1 ? 0 : acos(cosangle);
104 float anglespeed = angle / dt;
114 CS(
this).anticheat_div0_strafebot_forward_prev =
v_forward;
117 CS(
this).anticheat_speedhack_movetime_frac +=
frametime;
119 CS(
this).anticheat_speedhack_movetime_frac -= f;
120 CS(
this).anticheat_speedhack_movetime_count += f;
121 CS(
this).anticheat_speedhack_movetime =
CS(
this).anticheat_speedhack_movetime_frac +
CS(
this).anticheat_speedhack_movetime_count;
124 CS(
this).anticheat_speedhack_offset = f;
128 CS(
this).anticheat_speedhack_offset += (f -
CS(
this).anticheat_speedhack_offset) *
frametime * 0.1;
132 if (
CS(
this).anticheat_speedhack_lasttime > 0) {
133 float dt =
servertime -
CS(
this).anticheat_speedhack_lasttime;
135 CS(
this).anticheat_speedhack_accu *=
exp(-dt * falloff);
146 CS(
this).anticheat_speedhack_accu = 1;
154 this.
angles =
CS(spectatee).anticheat_div0_evade_v_angle;
160 CS(
this).anticheat_div0_evade_offset = 0;
176 #define ANTICHEATS(ANTICHEAT) \ 177 ANTICHEAT("speedhack", MEAN_EVALUATE(CS(this), anticheat_speedhack), 240, 0, 9999); \ 178 ANTICHEAT("speedhack_m1", MEAN_EVALUATE(CS(this), anticheat_speedhack_m1), 240, 1.01, 1.25); \ 179 ANTICHEAT("speedhack_m2", MEAN_EVALUATE(CS(this), anticheat_speedhack_m2), 240, 1.01, 1.25); \ 180 ANTICHEAT("speedhack_m3", MEAN_EVALUATE(CS(this), anticheat_speedhack_m3), 240, 1.01, 1.25); \ 181 ANTICHEAT("speedhack_m4", MEAN_EVALUATE(CS(this), anticheat_speedhack_m4), 240, 1.01, 1.25); \ 182 ANTICHEAT("speedhack_m5", MEAN_EVALUATE(CS(this), anticheat_speedhack_m5), 240, 1.01, 1.25); \ 183 ANTICHEAT("div0_strafebot_old", MEAN_EVALUATE(CS(this), anticheat_div0_strafebot_old), 120, 0.15, 0.4); \ 184 ANTICHEAT("div0_strafebot_new", MEAN_EVALUATE(CS(this), anticheat_div0_strafebot_new), 120, 0.25, 0.8); \ 185 ANTICHEAT("div0_evade", MEAN_EVALUATE(CS(this), anticheat_div0_evade), 120, 0.2, 0.5); \ 186 ANTICHEAT("idle_snapaim", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_signal) - MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_noise), 120, 0, 9999); \ 187 ANTICHEAT("idle_snapaim_signal", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_signal), 120, 0, 9999); \ 188 ANTICHEAT("idle_snapaim_noise", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_noise), 120, 0, 9999); \ 189 ANTICHEAT("idle_snapaim_m2", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m2), 120, 0, 9999); \ 190 ANTICHEAT("idle_snapaim_m3", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m3), 120, 0, 9999); \ 191 ANTICHEAT("idle_snapaim_m4", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m4), 120, 0, 9999); \ 192 ANTICHEAT("idle_snapaim_m7", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m7), 120, 0, 9999); \ 193 ANTICHEAT("idle_snapaim_m10", MEAN_EVALUATE(CS(this), anticheat_idle_snapaim_m10), 120, 0, 9999) 199 #define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) \ 200 GameLogEcho(strcat(":anticheat:", name, ":", anticheat_display(f, servertime - CS(this).anticheat_jointime, tmin, mi, ma))) 202 #undef ANTICHEAT_REPORT_ONE 206 PlayerStats_GameReport_Event_Player(
this,
208 #define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma) \ 209 PlayerStats_GameReport_Event_Player(this, strcat(PLAYERSTATS_ANTICHEAT, name), f) 211 #undef ANTICHEAT_REPORT_ONE 215 PlayerStats_GameReport_AddEvent(
strcat(PLAYERSTATS_ANTICHEAT,
"_time"));
216 #define ANTICHEAT_REGISTER_ONE(name, unused_f, unused_tmin, unused_mi, unused_ma) \ 217 PlayerStats_GameReport_AddEvent(strcat(PLAYERSTATS_ANTICHEAT, name)) 219 #undef ANTICHEAT_REGISTER_ONE 242 CS(
this).anticheat_speedhack_offset = 0;
vector anticheat_div0_strafebot_forward_prev
float anticheat_speedhack_offset
MEAN_DECLARE(anticheat_div0_evade, 5)
#define ANTICHEAT_REGISTER_ONE(name, unused_f, unused_tmin, unused_mi, unused_ma)
void anticheat_report_to_playerstats(entity this)
float anticheat_speedhack_movetime_count
void anticheat_init(entity this)
#define ANTICHEATS(ANTICHEAT)
#define MEAN_ACCUMULATE(s, prefix, v, w)
float anticheat_speedhack_movetime_frac
float anticheat_div0_evade_offset
ClientState CS(Client this)
void anticheat_spectatecopy(entity this, entity spectatee)
#define FOREACH_CLIENT(cond, body)
float movement_oddity(vector m0, vector m1)
float anticheat_speedhack_lasttime
void anticheat_report_to_eventlog(entity this)
void anticheat_endframe()
void anticheat_prethink(entity this)
string anticheat_display(float f, float t, float tmin, float mi, float ma)
float anticheat_div0_evade_evasion_delta
void anticheat_fixangle(entity this)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void anticheat_register_to_playerstats()
void GameLogEcho(string s)
void anticheat_physics(entity this)
float anticheat_speedhack_movetime
void anticheat_startframe()
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float anticheat_speedhack_accu
vector anticheat_div0_strafebot_movement_prev
vector anticheat_div0_evade_forward_initial
#define ANTICHEAT_REPORT_ONE(name, f, tmin, mi, ma)
vector anticheat_div0_evade_v_angle
float anticheat_fixangle_endtime
#define ANTILAG_LATENCY(e)
bool autocvar_sv_eventlog