]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
fix a signed/unsigned comparison warning
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index c43e5ef3420b45c86fabfcfc1601a584d830b250..6c2c680d27f0c06caf1dcf6f4819195c88d7cb57 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -504,10 +504,10 @@ void Sbar_SoloScoreboard (void)
 
 // draw level name
        if (gamemode == GAME_NEXUIZ) {
-               l = strlen (cl.worldmodel->name);
+               l = (int) strlen (cl.worldmodel->name);
                Sbar_DrawString (232 - l*4, 12, cl.worldmodel->name);
        } else {
-               l = strlen (cl.levelname);
+               l = (int) strlen (cl.levelname);
                Sbar_DrawString (232 - l*4, 12, cl.levelname);
        }
 }
@@ -723,15 +723,14 @@ void Sbar_DrawFrags (void)
                f = s->frags;
                sprintf (num, "%3i",f);
 
-               Sbar_DrawCharacter (x +  8, -24, num[0]);
-               Sbar_DrawCharacter (x + 16, -24, num[1]);
-               Sbar_DrawCharacter (x + 24, -24, num[2]);
-
                if (k == cl.viewentity - 1)
                {
                        Sbar_DrawCharacter ( x      + 2, -24, 16);
                        Sbar_DrawCharacter ( x + 32 - 4, -24, 17);
                }
+               Sbar_DrawCharacter (x +  8, -24, num[0]);
+               Sbar_DrawCharacter (x + 16, -24, num[1]);
+               Sbar_DrawCharacter (x + 24, -24, num[2]);
                x += 32;
        }
 }
@@ -1179,7 +1178,7 @@ float Sbar_PrintScoreboardItem(scoreboard_t *s, float x, float y)
        // print the text
        //DrawQ_String(x, y, va("%c%4i %s", (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', (int) s->frags, s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0);
        // FIXME: use a constant for this color tag instead
-       DrawQ_ColoredString(x, y, va("%c%4i %s^" STRING_COLOR_DEFAULT_STR, (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', (int) s->frags, s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0, NULL ); 
+       DrawQ_ColoredString(x, y, va("%c%4i %s" STRING_COLOR_DEFAULT_STR, (s - cl.scores) == cl.playerentity - 1 ? 13 : ' ', (int) s->frags, s->name), 0, 8, 8, 1, 1, 1, 1 * sbar_alpha_fg.value, 0, NULL );
        return 8;
 }