+#include "playerstats.qh"
#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
#include "constants.qh"
#include "util.qh"
- #include <common/weapons/all.qh>
- #include "../server/weapons/accuracy.qh"
+ #include <common/weapons/_all.qh>
+ #include "../server/anticheat.qh"
#include "../server/defs.qh"
- #include "playerstats.qh"
#include "../server/scores.qh"
+ #include "../server/weapons/accuracy.qh"
#endif
#ifdef SVQC
PS_GR_P_ADDVAL(p, PLAYERSTATS_JOINS, 1);
PlayerStats_GameReport_Accuracy(p);
+ anticheat_report_to_playerstats(p);
if(IS_REAL_CLIENT(p))
{
PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_BOTLIKE);
PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD);
PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM);
+
+ anticheat_register_to_playerstats();
}
else { PlayerStats_GameReport_DelayMapVote = false; }
}
+// this... is a hack, a temporary one until we get a proper duel gametype
+string PlayerStats_GetGametype()
+{
+ return ((IS_GAMETYPE(DEATHMATCH) && autocvar_g_maxplayers == 2) ? "duel" : GetGametype());
+}
+
void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
{
string t, tn;
#ifdef WATERMARK
url_fputs(fh, sprintf("R %s\n", WATERMARK));
#endif
- url_fputs(fh, sprintf("G %s\n", GetGametype()));
+ url_fputs(fh, sprintf("G %s\n", PlayerStats_GetGametype()));
url_fputs(fh, sprintf("O %s\n", modname));
url_fputs(fh, sprintf("M %s\n", GetMapname()));
url_fputs(fh, sprintf("I %s\n", matchid));
case "e":
LOG_TRACE("G: ", gt);
LOG_TRACE("e: ", data);
- if (gt == GetGametype()) {
+ if (gt == PlayerStats_GetGametype()) {
handled = true;
float e = stof(data);
PlayerScore_Add(p, SP_ELO, +1 + e);