X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qc;h=f99c182466a535ba0273044045344df0ba748b7b;hb=84c9d49bbe408b001e8a677f763dc6c8beb1c2e3;hp=ffc81c4685794480cf749cea7b87129134b8de71;hpb=68b050a0b548bba714d11ebef05b414413c9bd04;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index ffc81c468..f99c18246 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -23,6 +23,7 @@ #include #include #include +#include #include // ============================================= @@ -341,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); } @@ -351,8 +354,11 @@ void reset_map(bool dorespawn) shuffleteams_on_reset_map = false; } - FOREACH_CLIENT(IS_PLAYER(it), - { + FOREACH_CLIENT(true, { + if (time <= game_starttime) + accuracy_reset(it); // for spectators too because weapon accuracy is persistent + if (!IS_PLAYER(it)) + continue; if (STAT(FROZEN, it)) Unfreeze(it, false); player_powerups_remove_all(it); @@ -444,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