]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
no team separator in mini DM overlay... prevent showing just two players (instead...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Jun 2007 07:11:34 +0000 (07:11 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Jun 2007 07:11:34 +0000 (07:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7389 d7cf8633-e32d-0410-b094-e92efae38249

sbar.c

diff --git a/sbar.c b/sbar.c
index 35c5563da56b803fc1658660c41c5a8db8fafa9d..65f0cd2969a9158ae2b18850be5bcb4a856ae8fc 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -1690,7 +1690,7 @@ Sbar_DeathmatchOverlay
 */
 void Sbar_MiniDeathmatchOverlay (int x, int y)
 {
-       int i, j, numlines, range_begin, range_end, myteam;
+       int i, j, numlines, range_begin, range_end, myteam, teamsep;
 
        // scores
        Sbar_SortFrags ();
@@ -1712,6 +1712,7 @@ void Sbar_MiniDeathmatchOverlay (int x, int y)
 
        range_begin = 0;
        range_end = scoreboardlines;
+       teamsep = 0;
 
        if (gamemode != GAME_TRANSFUSION)
                if (Sbar_IsTeammatch ())
@@ -1726,6 +1727,13 @@ void Sbar_MiniDeathmatchOverlay (int x, int y)
                                --range_begin;
                        while(range_end < scoreboardlines && (cl.scores[fragsort[range_end]].colors & 15) == myteam)
                                ++range_end;
+
+                       // looks better than two players
+                       if(numlines == 2)
+                       {
+                               teamsep = 8;
+                               numlines = 1;
+                       }
                }
 
        // figure out start
@@ -1743,10 +1751,9 @@ void Sbar_MiniDeathmatchOverlay (int x, int y)
                if (Sbar_IsTeammatch ())
                {
                        // show team scores first
-                       y -= 5;
                        for (j = 0;j < teamlines && y < vid_conheight.integer;j++)
                                y += (int)Sbar_PrintScoreboardItem((teams + teamsort[j]), x, y);
-                       y += 5;
+                       y += teamsep;
                }
                for (;i < range_end && y < vid_conheight.integer;i++)
                        y += (int)Sbar_PrintScoreboardItem(cl.scores + fragsort[i], x, y);