From: havoc Date: Fri, 20 Oct 2006 15:16:19 +0000 (+0000) Subject: don't crash in scoreboard code when connected to a qw server as a spectator X-Git-Tag: xonotic-v0.1.0preview~3787 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c81be8e61ee8320a91b082c2bd77e172f9ec143e;p=xonotic%2Fdarkplaces.git don't crash in scoreboard code when connected to a qw server as a spectator git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6606 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sbar.c b/sbar.c index 809c6044..2e1140ac 100644 --- a/sbar.c +++ b/sbar.c @@ -1400,9 +1400,9 @@ float Sbar_PrintScoreboardItem(scoreboard_t *s, float x, float y) if (s->qw_spectator) { if (s->qw_ping || s->qw_packetloss) - DrawQ_ColoredString(x, y, va("%4i %3i %4i spectator %c%s", bound(0, s->qw_ping, 9999), bound(0, s->qw_packetloss, 99), minutes, cl.qw_teamplay ? s->qw_team : "", (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0, NULL ); + DrawQ_ColoredString(x, y, va("%4i %3i %4i spectator %c%s", bound(0, s->qw_ping, 9999), bound(0, s->qw_packetloss, 99), minutes, (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0, NULL ); else - DrawQ_ColoredString(x, y, va(" %4i spectator %c%s", minutes, cl.qw_teamplay ? s->qw_team : "", (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0, NULL ); + DrawQ_ColoredString(x, y, va(" %4i spectator %c%s", minutes, (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0, NULL ); } else {