X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fplayerstats.qh;h=b95037747b459c8bf055a6a2d3f46e6e57d87199;hb=6d29c38961d30195ae9b34b17ac3fac633382185;hp=b7b425f29289c2abf6b166e53fd19676e8df4cdf;hpb=c94e06a08777b32dea9a5b3a3934da16f50803bf;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/playerstats.qh b/qcsrc/server/playerstats.qh index b7b425f29..b95037747 100644 --- a/qcsrc/server/playerstats.qh +++ b/qcsrc/server/playerstats.qh @@ -1,9 +1,29 @@ // time the player was alive and kicking -string PLAYERSTATS_ALIVETIME = "alivetime"; -string PLAYERSTATS_KILLS = "kills"; +const string PLAYERSTATS_ALIVETIME = "alivetime"; +const string PLAYERSTATS_AVGLATENCY = "avglatency"; +const string PLAYERSTATS_WINS = "wins"; +const string PLAYERSTATS_MATCHES = "matches"; +const string PLAYERSTATS_JOINS = "joins"; +const string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid"; +const string PLAYERSTATS_RANK = "rank"; +const string PLAYERSTATS_SCOREBOARD_POS = "scoreboardpos"; + +const string PLAYERSTATS_TOTAL = "total-"; +const string PLAYERSTATS_SCOREBOARD = "scoreboard-"; + +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3 = "achievement-kill-spree-3"; +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5 = "achievement-kill-spree-5"; +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10 = "achievement-kill-spree-10"; +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15 = "achievement-kill-spree-15"; +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20 = "achievement-kill-spree-20"; +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25 = "achievement-kill-spree-25"; +const string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30 = "achievement-kill-spree-30"; +const string PLAYERSTATS_ACHIEVEMENT_BOTLIKE = "achievement-botlike"; +const string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood"; +const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim"; // delay map switch until this is set -float playerstats_sent; +float playerstats_waitforme; // call at initialization void PlayerStats_Init(); @@ -11,17 +31,23 @@ void PlayerStats_Init(); // add a new player void PlayerStats_AddPlayer(entity e); +// add a new team +void PlayerStats_AddTeam(float t); + // add a new event void PlayerStats_AddEvent(string event_id); // call on each event to track, or at player disconnect OR match end for "global stuff" -void PlayerStats_Event(entity e, string event_id, float value); +float PlayerStats_Event(entity e, string event_id, float value); + +// add a team score +float PlayerStats_TeamScore(float t, string event_id, float value); // call at game over void PlayerStats_Shutdown(); // send stats to the server -// URI GET callback -void PlayerStats_Sent_URI_Get_Callback(float id, float status, string data); - // call this whenever a player leaves void PlayerStats_AddGlobalInfo(entity p); + +// call this at the end of the match +void PlayerStats_EndMatch(float finished);