Map_MarkAsRecent(mapname);
+ PlayerStats_Init(); // we need this to be initiated before InitGameplayMode
+
precache_model ("null"); // we need this one before InitGameplayMode
InitGameplayMode();
readlevelcvars();
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
.float playerstats_addedglobalinfo;
.string playerstats_id;
-void PlayerStats_Init()
+void PlayerStats_Init() // initiated before InitGameplayMode so that scores are added properly
{
string uri;
playerstats_db = -1;
switch(status)
{
case URL_READY_CANWRITE:
- url_fputs(fh, "V 3\n");
+ url_fputs(fh, "V 4\n");
#ifdef WATERMARK
url_fputs(fh, sprintf("R %s\n", WATERMARK()));
#endif
{
//PlayerStats_Accuracy(p); // stats are already written with PlayerStats_AddGlobalInfo(entity), don't double them up.
- if(g_arena || g_lms || g_ca)
- if(p.alivetime <= 0) { continue; }
- else
- if(p.classname != "player") { continue; }
+ if((g_arena || g_lms || g_ca) && (p.alivetime <= 0)) { continue; }
+ else if(p.classname != "player") { continue; }
PlayerScore_PlayerStats(p);
PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_VALID, 1);