From: havoc Date: Fri, 3 Sep 2004 01:39:42 +0000 (+0000) Subject: fixed number of displayed scores in the minideathmatchoverlay in GAME_TRANSFUSION X-Git-Tag: xonotic-v0.1.0preview~5660 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3f25e246519ae75eed27c635043aa4d48b2983e9;p=xonotic%2Fdarkplaces.git fixed number of displayed scores in the minideathmatchoverlay in GAME_TRANSFUSION git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4421 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sbar.c b/sbar.c index 9561ca80..2e7c781f 100644 --- a/sbar.c +++ b/sbar.c @@ -686,7 +686,7 @@ void Sbar_DrawFrags (void) Sbar_SortFrags (); // draw the text - l = scoreboardlines <= 4 ? scoreboardlines : 4; + l = min(scoreboardlines, 4); x = 23 * 8; @@ -1200,10 +1200,13 @@ void Sbar_MiniDeathmatchOverlay (int x, int y) int i, numlines; // decide where to print + if (gamemode == GAME_TRANSFUSION) + numlines = (vid.conwidth - x + 127) / 128; + else + numlines = (vid.conheight - y + 7) / 8; - numlines = (vid.conheight - y) / 8; // give up if there isn't room - if (x + (6 + 15) * 8 > vid.conwidth || numlines < 1) + if (x >= vid.conwidth || y >= vid.conheight || numlines < 1) return; // scores @@ -1214,13 +1217,9 @@ void Sbar_MiniDeathmatchOverlay (int x, int y) if (fragsort[i] == cl.playerentity - 1) break; - if (i == scoreboardlines) // we're not there - i = 0; - else // figure out start - { - i -= numlines/2; - i = bound(0, i, scoreboardlines - numlines); - } + // figure out start + i -= numlines/2; + i = bound(0, i, scoreboardlines - numlines); if (gamemode == GAME_TRANSFUSION) {