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)
scores_primary = scores[i];
scores_flags_primary = scoreflags;
}
- PlayerStats_AddEvent(strcat(PLAYERSTATS_TOTAL, label));
- PlayerStats_AddEvent(strcat(PLAYERSTATS_SCOREBOARD, label));
+ if(label != "")
+ {
+ PlayerStats_AddEvent(strcat(PLAYERSTATS_TOTAL, label));
+ PlayerStats_AddEvent(strcat(PLAYERSTATS_SCOREBOARD, label));
+ }
}
void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags)
entity secondscorekeeper;
entity sk;
+ // format:
+ // gametype:P<pure>:S<slots>::plabel,plabel:tlabel,tlabel:teamid:tscore,tscore:teamid:tscore,tscore
+ // score labels always start with a symbol or with lower case
+ // so to match pure, match for :P0:
+ // to match full, match for :S0:
+
s = GetGametype();
s = strcat(s, ":", autocvar_g_xonoticversion);
s = strcat(s, ":P", ftos(cvar_purechanges_count));
+ s = strcat(s, ":S", ftos(nJoinAllowed(0)));
s = strcat(s, "::", GetPlayerScoreString(world, 1)); // make this 1 once we can, note: this doesn't contain any :<letter>
fullstatus = autocvar_g_full_getstatus_responses;
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]));
+ }
+}