From: Jakob MG Date: Sun, 9 Sep 2012 15:28:14 +0000 (+0200) Subject: Revert "Move init for playerstats back behind score initialization.. It's a wonder" X-Git-Tag: xonotic-v0.7.0~243 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=13305807d20506d9a14a28f8c4b6b707adf7378b;p=xonotic%2Fxonotic-data.pk3dir.git Revert "Move init for playerstats back behind score initialization.. It's a wonder" This reverts commit 54317d398d30f051f33bfc28a8eb85df3f4e5b04. --- diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 224f6ce25..4b5bc74ad 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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 diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index d1e851939..a63f59403 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -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);