]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/vote.qc
Reset player stats on repeated readyrestart, it fixes #2656
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qc
index 09e277116a9efcc8c180355a9ee836a0eac9a039..f99c182466a535ba0273044045344df0ba748b7b 100644 (file)
@@ -342,6 +342,8 @@ void reset_map(bool dorespawn)
        {
                if (game_stopped)
                        return;
+
+               PlayerStats_GameReport_Reset_All();
                if (round_handler_IsActive())
                        round_handler_Reset(game_starttime);
        }
@@ -448,8 +450,6 @@ void ReadyRestart_force()
        FOREACH_CLIENT(IS_PLAYER(it), {
                it.alivetime = 0;
                CS(it).killcount = 0;
-               float val = PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, 0);
-               PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, -val);
        });
 
        restart_mapalreadyrestarted = false; // reset this var, needed when cvar sv_ready_restart_repeatable is in use