]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
Replaced snprintf and vnsprintf calls by dpsnprintf and dpvsnprintf calls, to ensure...
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index 5e5ffd838aaaf6660fbf57257844868af36c75ad..7512d953d47cbadb0b7aa8b13a1055a54a64177c 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -477,11 +477,13 @@ void Sbar_SoloScoreboard (void)
        int             minutes, seconds, tens, units;
        int             l;
 
-       sprintf (str,"Monsters:%3i /%3i", cl.stats[STAT_MONSTERS], cl.stats[STAT_TOTALMONSTERS]);
-       Sbar_DrawString (8, 4, str);
+       if (gamemode != GAME_NEXUIZ) {
+               sprintf (str,"Monsters:%3i /%3i", cl.stats[STAT_MONSTERS], cl.stats[STAT_TOTALMONSTERS]);
+               Sbar_DrawString (8, 4, str);
 
-       sprintf (str,"Secrets :%3i /%3i", cl.stats[STAT_SECRETS], cl.stats[STAT_TOTALSECRETS]);
-       Sbar_DrawString (8, 12, str);
+               sprintf (str,"Secrets :%3i /%3i", cl.stats[STAT_SECRETS], cl.stats[STAT_TOTALSECRETS]);
+               Sbar_DrawString (8, 12, str);
+       }
 
 // time
        minutes = cl.time / 60;
@@ -492,8 +494,13 @@ void Sbar_SoloScoreboard (void)
        Sbar_DrawString (184, 4, str);
 
 // draw level name
-       l = strlen (cl.levelname);
-       Sbar_DrawString (232 - l*4, 12, cl.levelname);
+       if (gamemode == GAME_NEXUIZ) {
+               l = strlen (cl.worldmodel->name);
+               Sbar_DrawString (232 - l*4, 12, cl.worldmodel->name);
+       } else {
+               l = strlen (cl.levelname);
+               Sbar_DrawString (232 - l*4, 12, cl.levelname);
+       }
 }
 
 /*
@@ -518,7 +525,7 @@ static void Sbar_DrawWeapon(int nr, float fade, int active)
        const float w_scale = 0.4;
 
        DrawQ_Pic(vid.conwidth - (w_width + w_space) * w_scale, (w_height + w_space) * w_scale * nr + w_space, sb_weapons[0][nr]->name, w_width * w_scale, w_height * w_scale, (active) ? 1 : 0.6, active ? 1 : 0.6, active ? 1 : 1, fade * sbar_alpha_fg.value, DRAWFLAG_ADDITIVE);
-       DrawQ_String(vid.conwidth - (w_space + font_size ), (w_height + w_space) * w_scale * nr + w_space, va("%i",nr+1), 0, font_size, font_size, 1, 0, 0, fade, 0);
+       //DrawQ_String(vid.conwidth - (w_space + font_size ), (w_height + w_space) * w_scale * nr + w_space, va("%i",nr+1), 0, font_size, font_size, 1, 0, 0, fade, 0);
 
        if (active)
                DrawQ_Fill(vid.conwidth - (w_width + w_space) * w_scale, (w_height + w_space) * w_scale * nr + w_space, w_width * w_scale, w_height * w_scale, 0.3, 0.3, 0.3, fade * sbar_alpha_fg.value, DRAWFLAG_ADDITIVE);
@@ -840,7 +847,7 @@ void Sbar_ShowFPS(void)
                        framecount++;
                        calc = framerate;
                }
-               snprintf(fpsstring, sizeof(fpsstring), "%4i fps", calc);
+               dpsnprintf(fpsstring, sizeof(fpsstring), "%4i fps", calc);
        }
        if (showtime.integer)
                strlcpy(timestring, Sys_TimeString(showtime_format.string), sizeof(timestring));