From: terencehill Date: Wed, 13 Dec 2023 11:12:41 +0000 (+0100) Subject: Don't send match stats if game ends during warmup (xonstats doesn't register them... X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=7d3f28d159afcb007bdda0ec7d8fa735e88cc3f6;p=xonotic%2Fxonotic-data.pk3dir.git Don't send match stats if game ends during warmup (xonstats doesn't register them anyway) --- diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 1ac99701f..548246f5f 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -258,22 +258,21 @@ void PlayerStats_GameReport(bool finished) 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