X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fplayerstats.qh;h=d27dd0ed1f775038bb904e57327876a84d45314d;hb=d8e73f411f306e6d475bf385bfe5777692aee4a0;hp=e77cdbff594f42c874f836d57d47ee537bcb370c;hpb=cfc1a19f21842b65814c855082b059b22ff0c392;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index e77cdbff5..d27dd0ed1 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -1,5 +1,4 @@ -#ifndef PLAYERSTATS_H -#define PLAYERSTATS_H +#pragma once #ifdef SVQC //float PS_PM_IN_DB = -1; // playerstats_prematch_in_db // db for info COLLECTED at the beginning of a match @@ -41,6 +40,7 @@ const string PLAYERSTATS_SCOREBOARD_POS = "scoreboardpos"; const string PLAYERSTATS_TOTAL = "total-"; const string PLAYERSTATS_SCOREBOARD = "scoreboard-"; +const string PLAYERSTATS_ANTICHEAT = "anticheat-"; const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3 = "achievement-kill-spree-3"; const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5 = "achievement-kill-spree-5"; @@ -54,7 +54,7 @@ const string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood"; const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim"; // delay map switch until this is set -float PlayerStats_GameReport_DelayMapVote; +bool PlayerStats_GameReport_DelayMapVote; // call at initialization void PlayerStats_GameReport_Init(); @@ -69,8 +69,8 @@ void PlayerStats_GameReport_AddTeam(float t); void PlayerStats_GameReport_AddEvent(string event_id); // call on each event to track, or at player disconnect OR match end for "global stuff" -#define PS_GR_P_ADDVAL(ent,eventid,val) PlayerStats_GameReport_Event(ent.playerstats_id, eventid, val) -#define PS_GR_T_ADDVAL(team,eventid,val) PlayerStats_GameReport_Event(sprintf("team#%d", team), eventid, val) +#define PlayerStats_GameReport_Event_Player(ent, eventid, val) PlayerStats_GameReport_Event(ent.playerstats_id, eventid, val) +#define PlayerStats_GameReport_Event_Team(team, eventid, val) PlayerStats_GameReport_Event(sprintf("team#%d", team), eventid, val) float PlayerStats_GameReport_Event(string prefix, string event_id, float value); void PlayerStats_GameReport_Accuracy(entity p); @@ -112,8 +112,7 @@ const float PS_D_STATUS_RECEIVED = 1; float PlayerStats_PlayerDetail_Status = PS_D_STATUS_IDLE; string autocvar_g_playerstats_playerdetail_uri = "http://stats.xonotic.org/player/me"; float autocvar_g_playerstats_playerdetail_autoupdatetime = 1800; // automatically update every 30 minutes anyway -void PlayerStats_PlayerDetail(void); -void PlayerStats_PlayerDetail_CheckUpdate(void); +void PlayerStats_PlayerDetail(); +void PlayerStats_PlayerDetail_CheckUpdate(); void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status); #endif -#endif