X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qc;h=8d5fa100c92eec6bdc2f34a793ed917ccd7e5a92;hb=bb4571959d522baddbf445b968aba15bb4ad6f34;hp=b2b0a138f1d964782c45731c157e7bda15e9a695;hpb=e142bf1bca72d0438a1f49d45526d99601bddfea;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index b2b0a138f..8d5fa100c 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -88,6 +88,7 @@ void TeamScore_Spawn(float t, string name) Net_LinkEntity(ts, FALSE, 0, TeamScore_SendEntity); teamscorekeepers[t - 1] = ts; ++teamscores_entities_count; + PlayerStats_AddTeam(t); } float TeamScore_AddToTeam(float t, float scorefield, float score) @@ -374,7 +375,6 @@ void WinningConditionHelper() entity winnerscorekeeper; entity secondscorekeeper; entity sk; - float slots; // format: // gametype:P:S::plabel,plabel:tlabel,tlabel:teamid:tscore,tscore:teamid:tscore,tscore @@ -891,3 +891,19 @@ void PlayerScore_PlayerStats(entity p) if(scores_label[i] != "") PlayerStats_Event(s.owner, strcat(PLAYERSTATS_SCOREBOARD, scores_label[i]), s.(scores[i])); } + +void PlayerScore_TeamStats(void) +{ + entity sk; + float t, i; + for(t = 0; t < 16; ++t) + { + sk = teamscorekeepers[t]; + if(!sk) + continue; + for(i = 0; i < MAX_TEAMSCORE; ++i) + if(sk.(teamscores[i]) != 0) + if(teamscores_label[i] != "") + PlayerStats_TeamScore(t, strcat(PLAYERSTATS_SCOREBOARD, teamscores_label[i]), sk.(teamscores[i])); + } +}