X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qc;h=0769a4f038021e85b09ebabb757090c482de98a6;hb=129ac6d2e1c51e90e97c96085858bc586fb7ec24;hp=ad10fa5d53accf9baa0e4791a96215acc0bf691c;hpb=7094e1bf39336183150e9da00f9d3e2d7d0b664b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index ad10fa5d5..0769a4f03 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -171,6 +171,11 @@ void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags) teamscores_primary = teamscores[i]; teamscores_flags_primary = scoreflags; } + if(label != "") + { + PlayerStats_AddEvent(strcat(PLAYERSTATS_TOTAL, label)); + PlayerStats_AddEvent(strcat(PLAYERSTATS_SCOREBOARD, label)); + } } float ScoreInfo_SendEntity(entity to, float sf) @@ -523,16 +528,16 @@ void WinningConditionHelper() if(fullstatus) { s = GetPlayerScoreString(p, 1); - if(clienttype(p) == CLIENTTYPE_REAL) + if(IS_REAL_CLIENT(p)) s = strcat(s, ":human"); else s = strcat(s, ":bot"); - if(p.classname != "player" && !g_arena && p.caplayer != 1 && !g_lms) + if(!IS_PLAYER(p) && !g_arena && p.caplayer != 1 && !g_lms) s = strcat(s, ":spectator"); } else { - if(p.classname == "player" || g_arena || p.caplayer == 1 || g_lms) + if(IS_PLAYER(p) || g_arena || p.caplayer == 1 || g_lms) s = GetPlayerScoreString(p, 2); else s = "-666"; @@ -894,7 +899,7 @@ void Score_NicePrint(entity to) t = 0; FOR_EACH_CLIENT(p) - if(p.classname != "player") + if not(IS_PLAYER(p)) { if not(t) Score_NicePrint_Spectators(to); @@ -927,6 +932,7 @@ void PlayerScore_TeamStats(void) 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])); + // the +1 is important here! + PlayerStats_TeamScore(t+1, strcat(PLAYERSTATS_SCOREBOARD, teamscores_label[i]), sk.(teamscores[i])); } }