From a35284cfac3c78bca64f935ff998c012949e66bf Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 16 Feb 2010 14:21:11 +0000 Subject: [PATCH] sbar.c (Sbar_SoloScoreboard): modified to include the map name and skill. (patch by Steven, modified to utilize cl.mapname by OZ.) git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@28 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/sbar.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Quake/sbar.c b/Quake/sbar.c index 34d9f802..d1c64319 100644 --- a/Quake/sbar.c +++ b/Quake/sbar.c @@ -489,9 +489,8 @@ Sbar_SoloScoreboard -- johnfitz -- new layout */ void Sbar_SoloScoreboard (void) { - char str[80]; - int minutes, seconds, tens, units; - int len; + char str[256]; + int len; sprintf (str,"Kills: %i/%i", cl.stats[STAT_MONSTERS], cl.stats[STAT_TOTALMONSTERS]); Sbar_DrawString (8, 12, str); @@ -499,18 +498,18 @@ void Sbar_SoloScoreboard (void) sprintf (str,"Secrets: %i/%i", cl.stats[STAT_SECRETS], cl.stats[STAT_TOTALSECRETS]); Sbar_DrawString (312 - strlen(str)*8, 12, str); - minutes = cl.time / 60; - seconds = cl.time - 60*minutes; - tens = seconds / 10; - units = seconds - 10*tens; - sprintf (str,"%i:%i%i", minutes, tens, units); + sprintf (str,"skill %i", (int)(skill.value + 0.5)); Sbar_DrawString (160 - strlen(str)*4, 12, str); - len = strlen (cl.levelname); + sprintf (str,cl.levelname); + strcat (str," ("); + strncat (str,cl.mapname,250-strlen(str)); + strcat (str,")"); + len = strlen (str); if (len > 40) - Sbar_DrawScrollString (0, 4, 320, cl.levelname); + Sbar_DrawScrollString (0, 4, 320, str); else - Sbar_DrawString (160 - len*4, 4, cl.levelname); + Sbar_DrawString (160 - len*4, 4, str); } /*