]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
clear alivetime on ready-restart
authorRudolf Polzer <divverent@xonotic.org>
Fri, 1 Feb 2013 13:35:19 +0000 (14:35 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 1 Feb 2013 13:35:19 +0000 (14:35 +0100)
qcsrc/server/command/vote.qc

index abdae75d5e73f62c6feed4bbf25ba8580e948a05..784a9821e07472e2957c692cf8bcf36c4c6908c1 100644 (file)
@@ -347,7 +347,14 @@ void ReadyRestart_force()
        readyrestart_happened = 1;
        game_starttime = time;
        if(!g_ca && !g_arena) { game_starttime += RESTART_COUNTDOWN; }
-               
+
+       // clear alivetime
+       FOR_EACH_CLIENTP(tmp_player)
+       {
+               tmp_player.alivetime = 0;
+               PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, -PlayerStats_Event(p, PLAYERSTATS_ALIVETIME));
+       }
+
        restart_mapalreadyrestarted = 0; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
 
        // disable the warmup global for the server