]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/playerstats.qc
Merge branch 'terencehill/cl_forceplayercolors_3' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / playerstats.qc
index cf272e5635a1eb66e72ec90810b864b10eff9f27..3b8c97c4b81626f6d292155e1831269540559b36 100644 (file)
@@ -5,9 +5,11 @@
     #include "constants.qh"
     #include "util.qh"
     #include <common/weapons/_all.qh>
+    #include <server/client.qh>
     #include "../server/anticheat.qh"
-    #include "../server/defs.qh"
+    #include <common/stats.qh>
     #include "../server/scores.qh"
+       #include <server/world.qh>
     #include "../server/weapons/accuracy.qh"
 #endif
 
@@ -294,7 +296,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                 * G: game type
                 * O: mod name (icon request) as in server browser
                 * M: map name
-                * I: match ID (see "matchid" in g_world.qc)
+                * I: match ID (see "matchid" in world.qc)
                 * S: "hostname" of the server
                 * C: number of "unpure" cvar changes
                 * U: UDP port number of the server
@@ -490,6 +492,21 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest)
        }
 }
 
+SHUTDOWN(PlayerStats_PlayerBasic_Shutdown)
+{
+       if(PS_B_IN_DB >= 0)
+       {
+               db_close(PS_B_IN_DB);
+               PS_B_IN_DB = -1;
+       }
+
+       if(PS_GR_OUT_DB >= 0)
+       {
+               db_close(PS_GR_OUT_DB);
+               PS_GR_OUT_DB = -1;
+       }
+}
+
 void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer)
 {
        // determine whether we should retrieve playerbasic information again