]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't send match stats if game ends during warmup (xonstats doesn't register them...
authorterencehill <piuntn@gmail.com>
Wed, 13 Dec 2023 11:12:41 +0000 (12:12 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 13 Dec 2023 11:12:41 +0000 (12:12 +0100)
qcsrc/common/playerstats.qc

index 1ac99701f515ce3f26f386b054c33a0755927755..548246f5fc45a75b82af918a1f9bd9aa70f2b145 100644 (file)
@@ -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