fputs(file, ":end\n");
fclose(file);
}
-
- // send statistics
- FOR_EACH_CLIENT(e)
- PlayerStats_AddGlobalInfo(e);
- PlayerStats_Shutdown();
}
void FixIntermissionClient(entity e)
VoteReset();
DumpStats(TRUE);
- PlayerStats_EndMatch();
+
+ // send statistics
+ entity e;
+ PlayerStats_EndMatch(1);
+ FOR_EACH_CLIENT(e)
+ PlayerStats_AddGlobalInfo(e);
+ PlayerStats_Shutdown();
if(autocvar_sv_eventlog)
GameLogEcho(":gameover");
print("Saving persistent data...\n");
Ban_SaveBans();
+ PlayerStats_EndMatch(0);
FOR_EACH_CLIENT(e)
PlayerStats_AddGlobalInfo(e);
PlayerStats_Shutdown();
p.playerstats_id = string_null;
}
-void PlayerStats_EndMatch()
+void PlayerStats_EndMatch(float finished)
{
entity p;
FOR_EACH_PLAYER(p)
{
PlayerScore_PlayerStats(p);
- PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
- PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
+ if(finished)
+ {
+ PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
+ PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
+ }
}
}
void PlayerStats_AddGlobalInfo(entity p);
// call this at the end of the match
-void PlayerStats_EndMatch()
+void PlayerStats_EndMatch(float finished);