if(PS_GR_OUT_DB < 0)
return;
- for (int i = 0; i < 16; i++)
+ for (int i = 0; i < 16; ++i)
if (teamscorekeepers[i])
PlayerStats_GameReport_AddTeam(i + 1);
FOREACH_CLIENT(true, {
PlayerStats_GameReport_FinalizePlayer(it);
});
- if(autocvar_g_playerstats_gamereport_uri != "")
- {
- PlayerStats_GameReport_DelayMapVote = true;
- url_multi_fopen(
- autocvar_g_playerstats_gamereport_uri,
- FILE_APPEND,
- PlayerStats_GameReport_Handler,
- NULL
- );
- }
- else
+ if(autocvar_g_playerstats_gamereport_uri == "" || warmup_stage)
{
PlayerStats_GameReport_DelayMapVote = false;
db_close(PS_GR_OUT_DB);
PS_GR_OUT_DB = -1;
+ return;
}
+
+ PlayerStats_GameReport_DelayMapVote = true;
+ url_multi_fopen(
+ autocvar_g_playerstats_gamereport_uri,
+ FILE_APPEND,
+ PlayerStats_GameReport_Handler,
+ NULL
+ );
}
void PlayerStats_GameReport_Init() // initiated before InitGameplayMode so that scores are added properly
{
PlayerStats_GameReport_DelayMapVote = true;
- serverflags |= SERVERFLAG_PLAYERSTATS;
if(autocvar_g_playerstats_gamereport_uri != cvar_defstring("g_playerstats_gamereport_uri"))
- {
- serverflags |= SERVERFLAG_PLAYERSTATS_CUSTOM;
- }
+ serverflags |= SERVERFLAG_PLAYERSTATS | SERVERFLAG_PLAYERSTATS_CUSTOM;
+ else if(checkextension("DP_CRYPTO") && checkextension("DP_QC_URI_POST"))
+ // XonStat submission requires player and server IDs, and HTTPS POST
+ serverflags |= SERVERFLAG_PLAYERSTATS;
PlayerStats_GameReport_AddEvent(PLAYERSTATS_ALIVETIME);
PlayerStats_GameReport_AddEvent(PLAYERSTATS_AVGLATENCY);