From 7d3f28d159afcb007bdda0ec7d8fa735e88cc3f6 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 13 Dec 2023 12:12:41 +0100 Subject: [PATCH] Don't send match stats if game ends during warmup (xonstats doesn't register them anyway) --- qcsrc/common/playerstats.qc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) 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 -- 2.39.2