X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fplayerstats.qh;h=ec309c4f4c191fc9d46500e57ff8de3d0571e2ab;hb=64b8409b2d6fb93dc51ba24a82d219c8cd56a907;hp=26a1efc28cfa68a4074dc08c58fa3ce0e7d10226;hpb=5dbda91e68e08abcedef699f99c3654c8f97242b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index 26a1efc28..ec309c4f4 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -1,18 +1,21 @@ +#ifndef PLAYERSTATS_H +#define PLAYERSTATS_H + #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) +//float PS_PM_IN_DB = -1; // playerstats_prematch_in_db // db for info COLLECTED at the beginning of a match +int 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 +int 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 +int 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 @@ -85,15 +88,15 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status); //string autocvar_g_playerstats_uri; string autocvar_g_playerstats_gamereport_ladder; -var string autocvar_g_playerstats_gamereport_uri = "http://stats.xonotic.org/stats/submit"; +string autocvar_g_playerstats_gamereport_uri = "http://stats.xonotic.org/stats/submit"; -#define PS_B_STATUS_ERROR -2 -#define PS_B_STATUS_IDLE -1 -#define PS_B_STATUS_WAITING 0 -#define PS_B_STATUS_RECEIVED 1 -#define PS_B_STATUS_UPDATING 2 +const float PS_B_STATUS_ERROR = -2; +const float PS_B_STATUS_IDLE = -1; +const float PS_B_STATUS_WAITING = 0; +const float PS_B_STATUS_RECEIVED = 1; +const float PS_B_STATUS_UPDATING = 2; .float playerstats_basicstatus; -var string autocvar_g_playerstats_playerbasic_uri = "http://stats.xonotic.org"; +string autocvar_g_playerstats_playerbasic_uri = "http://stats.xonotic.org"; void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest); void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer); @@ -102,14 +105,15 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status); #ifdef MENUQC float PS_D_NEXTUPDATETIME; float PS_D_LASTGAMECOUNT; -#define PS_D_STATUS_ERROR -2 -#define PS_D_STATUS_IDLE -1 -#define PS_D_STATUS_WAITING 0 -#define PS_D_STATUS_RECEIVED 1 -var float PlayerStats_PlayerDetail_Status = PS_D_STATUS_IDLE; -var string autocvar_g_playerstats_playerdetail_uri = "http://stats.xonotic.org/player/me"; -var float autocvar_g_playerstats_playerdetail_autoupdatetime = 1800; // automatically update every 30 minutes anyway -void PlayerStats_PlayerDetail(void); -void PlayerStats_PlayerDetail_CheckUpdate(void); +const float PS_D_STATUS_ERROR = -2; +const float PS_D_STATUS_IDLE = -1; +const float PS_D_STATUS_WAITING = 0; +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 PlayerStats_PlayerDetail_CheckUpdate(); void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status); #endif +#endif