]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Move init for playerstats back behind score initialization.. It's a wonder"
authorJakob MG <jakob_mg@hotmail.com>
Sun, 9 Sep 2012 15:28:14 +0000 (17:28 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Sun, 9 Sep 2012 15:28:14 +0000 (17:28 +0200)
This reverts commit 54317d398d30f051f33bfc28a8eb85df3f4e5b04.

qcsrc/server/g_world.qc
qcsrc/server/playerstats.qc

index 224f6ce259763962b12b88230dbe4176eef34d14..4b5bc74add74a5e7b6f454dd26842d9c302da55b 100644 (file)
@@ -639,8 +639,6 @@ void spawnfunc_worldspawn (void)
 
        Map_MarkAsRecent(mapname);
 
-       PlayerStats_Init(); // we need this to be initiated before InitGameplayMode
-
        precache_model ("null"); // we need this one before InitGameplayMode
        InitGameplayMode();
        readlevelcvars();
@@ -914,6 +912,8 @@ void spawnfunc_worldspawn (void)
                cvar_set("sv_curl_serverpackages", substring(s, 1, -1));
        }
 
+       PlayerStats_Init();
+
        // MOD AUTHORS: change this, and possibly remove a few of the blocks below to ignore certain changes
        modname = "Xonotic";
        // physics/balance/config changes that count as mod
index d1e851939012968e9e9b1407035bfc9b8e1e5686..a63f59403721b46ca4d5b5b907cedf1d112050bd 100644 (file)
@@ -5,7 +5,7 @@ string events_last;
 .float playerstats_addedglobalinfo;
 .string playerstats_id;
 
-void PlayerStats_Init() // initiated before InitGameplayMode so that scores are added properly
+void PlayerStats_Init()
 {
        string uri;
        playerstats_db = -1;
@@ -17,7 +17,7 @@ void PlayerStats_Init() // initiated before InitGameplayMode so that scores are
        if(playerstats_db >= 0)
                playerstats_waitforme = FALSE; // must wait for it at match end
 
-       serverflags |= SERVERFLAG_PLAYERSTATS;
+       serverflags |= SERVERFLAG_PLAYERSTATS;  
 
        PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
        PlayerStats_AddEvent(PLAYERSTATS_WINS);
@@ -124,7 +124,7 @@ void PlayerStats_AddEvent(string event_id)
 {
        if(playerstats_db < 0)
                return;
-
+       
        string key;
        key = sprintf("*:%s", event_id);