z411: "I think it seems to work as you expect because you are resetting the accuracies before the match starts, but once the players respawn accuracy_resend() which actually sends the stats is called in PutPlayerInServer() when they respawn. So the server is actually resetting the stats before it should, but sends them when they respawn."
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);
game_starttime = time + RESTART_COUNTDOWN;
// clear player attributes
- FOREACH_CLIENT(true, {
- accuracy_reset(it);
- if (!IS_PLAYER(it))
- continue;
+ FOREACH_CLIENT(IS_PLAYER(it), {
it.alivetime = 0;
CS(it).killcount = 0;
float val = PlayerStats_GameReport_Event_Player(it, PLAYERSTATS_ALIVETIME, 0);