]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/playerstats.qh
Fix bad initialization of playerstats db handlers (caused error spam in the console...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / playerstats.qh
index 3e794c102515fb49a5c20a9ea78c7c73c68a8823..ab4bc166f0b29f05134bf953f16a4ae75deb0c69 100644 (file)
@@ -1,22 +1,18 @@
 #ifdef SVQC
-//float PS_PM_IN_DB;   // playerstats_prematch_in_db      // db for info COLLECTED at the beginning of a match
-float PS_GR_OUT_DB;  // playerstats_gamereport_out_db   // db of info SENT at the end of a match
-//float PS_GR_IN_DB;   // playerstats_gamereport_in_db    // db for info COLLECTED at the end of a match
-float PS_B_IN_DB;    // playerstats_playerbasic_in_db   // db for info COLLECTED for basic player info (ELO)
-// http://stats.xonotic.org/player/GgXRw6piDtFIbMArMuiAi8JG4tiin8VLjZgsKB60Uds=/elo.txt -- this works, 
-// http://stats.xonotic.org/player/ENkUjf83vKMVZcNm%2F6Ao1EmXEj1apQ6XvdQTxwELvmA%3D/elo.txt -- but this doesn't?!?
-// ENkUjf83vKMVZcNm/6Ao1EmXEj1apQ6XvdQTxwELvmA=
+//float PS_PM_IN_DB = -1;   // playerstats_prematch_in_db      // db for info COLLECTED at the beginning of a match
+float PS_GR_OUT_DB = -1;  // playerstats_gamereport_out_db   // db of info SENT at the end of a match
+//float PS_GR_IN_DB = -1;   // playerstats_gamereport_in_db    // db for info COLLECTED at the end of a match
+float PS_B_IN_DB = -1;    // playerstats_playerbasic_in_db   // db for info COLLECTED for basic player info (ELO)
 #endif
 
 #ifdef MENUQC
-float PS_D_IN_DB; // playerstats_playerdetail_in_db  // db for info COLLECTED for detailed player profile display
-// http://stats.xonotic.org/player/me
+float PS_D_IN_DB = -1; // playerstats_playerdetail_in_db  // db for info COLLECTED for detailed player profile display
 #endif
 
 #ifdef SVQC
 //string PS_PM_IN_EVL;   // playerstats_prematch_in_events_last
 string PS_GR_OUT_TL;   // playerstats_gamereport_out_teams_last
-string PS_GR_OUT_PL;   // playerstats_gamereport_out_players_las
+string PS_GR_OUT_PL;   // playerstats_gamereport_out_players_last
 string PS_GR_OUT_EVL;  // playerstats_gamereport_out_events_last
 //string PS_GR_IN_PL;    // playerstats_gamereport_in_players_last
 //string PS_GR_IN_EVL;   // playerstats_gamereport_in_events_last
@@ -96,10 +92,11 @@ var string autocvar_g_playerstats_gamereport_uri = "http://stats.xonotic.org/sta
 #define PS_B_STATUS_WAITING 0
 #define PS_B_STATUS_RECEIVED 1
 #define PS_B_STATUS_UPDATING 2
-var float PlayerStats_PlayerBasic_Status = PS_B_STATUS_IDLE;
+.float playerstats_basicstatus;
 var string autocvar_g_playerstats_playerbasic_uri = "http://stats.xonotic.org";
 
-void PlayerStats_PlayerBasic();
+void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest);
+void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer);
 void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status);
 #endif //SVQC
 #ifdef MENUQC
@@ -116,27 +113,3 @@ void PlayerStats_PlayerDetail(void);
 void PlayerStats_PlayerDetail_CheckUpdate(void);
 void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status);
 #endif
-
-/*
-//// WIP -zykure /////////////////////////////////////////////////////
-
-
-//const string playerinfo_uri = "http://localhost:6543"; // FIXME
-
-string PlayerInfo_GetItem(entity e, string item_id);
-string PlayerInfo_GetItemLocal(string item_id);
-
-void PlayerInfo_Init();
-#ifdef SVQC
-string autocvar_g_playerinfo_uri;
-void PlayerInfo_Basic(entity p);
-#endif
-#ifdef MENUQC
-string autocvar_g_playerinfo_uri;
-void PlayerInfo_Details();
-#endif
-#ifdef CSQC
-
-//void PlayerInfo_Details();
-#endif
-*/