]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use proper infinity symbol for infinite ammo count
authorSeverin Meyer <sev.ch@web.de>
Sun, 18 Jan 2015 23:51:18 +0000 (00:51 +0100)
committerSeverin Meyer <sev.ch@web.de>
Sun, 18 Jan 2015 23:51:18 +0000 (00:51 +0100)
qcsrc/client/hud.qc

index 53cd34ee1696f0f4a0441d1f623748cd6cb46b0f..9e6861ebd06e7d05a4a0fabfc4c305dc4433c3c3 100644 (file)
@@ -935,6 +935,8 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent,
        else
                alpha = panel_fg_alpha * bound(0, autocvar_hud_panel_ammo_noncurrent_alpha, 1);
 
+       string text = isInfinite ? "\xE2\x88\x9E" : ftos(ammo); // Use infinity symbol (U+221E)
+
        // Draw item
 
        if(isCurrent)
@@ -944,7 +946,7 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammoType, float isCurrent,
                HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, autocvar_hud_panel_ammo_progressbar_name, ammo/autocvar_hud_panel_ammo_maxammo, 0, 0, textColor, autocvar_hud_progressbar_alpha * alpha, DRAWFLAG_NORMAL);
 
        if(autocvar_hud_panel_ammo_text)
-               drawstring_aspect(textPos, ftos(ammo), eX * (2/3) * mySize_x + eY * mySize_y, textColor, alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(textPos, text, eX * (2/3) * mySize_x + eY * mySize_y, textColor, alpha, DRAWFLAG_NORMAL);
 
        drawpic_aspect_skin(iconPos, GetAmmoPicture(ammoType), '1 1 0' * mySize_y, iconColor, alpha, DRAWFLAG_NORMAL);
 }