]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
GAME_NEXUIZ scoreboard team color names patch from KadaverJack
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Feb 2006 03:28:52 +0000 (03:28 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Feb 2006 03:28:52 +0000 (03:28 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5967 d7cf8633-e32d-0410-b094-e92efae38249

sbar.c

diff --git a/sbar.c b/sbar.c
index e9834182484099ff411ad39a34f51d783387bbc7..f2d1da545a942de71dd6d904d1bf8d0bb257c4d8 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -549,13 +549,24 @@ void Sbar_SortFrags (void)
                color = -1;
                for (i=0 ; i<scoreboardlines ; i++)
                {
-                       if (color != cl.scores[fragsort[i]].colors)
+                       if (color != (cl.scores[fragsort[i]].colors & 15))
                        {
-                               color = cl.scores[fragsort[i]].colors;
+                               color = cl.scores[fragsort[i]].colors & 15;
                                teamlines++;
-                               strcpy(teams[teamlines-1].name, "Total Team Score");
+
+                               if (color == 4)
+                                       strcpy(teams[teamlines-1].name, "^1Red Team");
+                               else if (color == 13)
+                                       strcpy(teams[teamlines-1].name, "^4Blue Team");
+                               else if (color == 9)
+                                       strcpy(teams[teamlines-1].name, "^6Pink Team");
+                               else if (color == 12)
+                                       strcpy(teams[teamlines-1].name, "^3Yellow Team");
+                               else
+                                       strcpy(teams[teamlines-1].name, "Total Team Score");
+                               
                                teams[teamlines-1].frags = 0;
-                               teams[teamlines-1].colors = cl.scores[fragsort[i]].colors;
+                               teams[teamlines-1].colors = color + 16 * color;
                        }
 
                        if (cl.scores[fragsort[i]].frags != -666)