]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Merge branch 'master' into samual/combined_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index c7f75a879ad49db75eaf1b611f3741f3ae23d971..469fca3408c18329eb85e5a516240ecfc8ec13cb 100644 (file)
@@ -215,7 +215,6 @@ void cvar_changes_init()
                // private
                BADCVAR("developer");
                BADCVAR("log_dest_udp");
-               BADCVAR("log_file");
                BADCVAR("net_address");
                BADCVAR("net_address_ipv6");
                BADCVAR("port");
@@ -236,6 +235,7 @@ void cvar_changes_init()
                BADPREFIX("g_playerstats_");
                BADPREFIX("g_respawn_ghosts");
                BADPREFIX("g_voice_flood_");
+               BADPREFIX("log_file");
                BADPREFIX("rcon_");
                BADPREFIX("sv_allowdownloads");
                BADPREFIX("sv_autodemo");
@@ -545,6 +545,7 @@ void spawnfunc___init_dedicated_server(void)
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
+       CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
 
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
@@ -594,6 +595,7 @@ void spawnfunc_worldspawn (void)
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
+       CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
 
        ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
 
@@ -645,7 +647,7 @@ void spawnfunc_worldspawn (void)
 
        Map_MarkAsRecent(mapname);
 
-       PlayerStats_Init(); // we need this to be initiated before InitGameplayMode
+       PlayerStats_GameReport_Init(); // we need this to be initiated before InitGameplayMode
 
        precache_model ("null"); // we need this one before InitGameplayMode
        InitGameplayMode();
@@ -793,6 +795,10 @@ void spawnfunc_worldspawn (void)
 
        addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
 
+       // freeze attacks
+       addstat(STAT_FROZEN, AS_INT, frozen);
+       addstat(STAT_REVIVE_PROGRESS, AS_FLOAT, revive_progress);
+
        // g_movementspeed hack
        addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
        addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
@@ -1522,11 +1528,7 @@ void NextLevel()
        DumpStats(TRUE);
 
        // send statistics
-       entity e;
-       PlayerStats_EndMatch(1);
-       FOR_EACH_CLIENT(e)
-               PlayerStats_AddGlobalInfo(e);
-       PlayerStats_Shutdown();
+       PlayerStats_GameReport(TRUE);
        WeaponStats_Shutdown();
 
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
@@ -2328,8 +2330,6 @@ void RestoreGame()
 
 void Shutdown()
 {
-       entity e;
-
        gameover = 2;
 
        if(world_initialized > 0)
@@ -2338,10 +2338,8 @@ void Shutdown()
                print("Saving persistent data...\n");
                Ban_SaveBans();
 
-               PlayerStats_EndMatch(0);
-               FOR_EACH_CLIENT(e)
-                       PlayerStats_AddGlobalInfo(e);
-               PlayerStats_Shutdown();
+               // playerstats with unfinished match
+               PlayerStats_GameReport(FALSE);
 
                if(!cheatcount_total)
                {