]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
use already existing, proved to work functions instead of creating own ones and watch...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 86bdbd48584dcbf6cc75523cd4e6b6986a80fa88..96d5a3362bf2607fdb886e7d8cf54ad032f0f731 100644 (file)
@@ -467,6 +467,9 @@ void HUD_Panel_ExportCfg(string cfgname)
                                case HUD_PANEL_WEAPONICONS:
                                        fputs(fh, strcat("seta hud_", panel_name, "_complainbubble \"", cvar_string(strcat("hud_", panel_name, "_complainbubble")), "\"", "\n"));
                                        fputs(fh, strcat("seta hud_", panel_name, "_complainbubble_padding \"", cvar_string(strcat("hud_", panel_name, "_complainbubble_padding")), "\"", "\n"));
+                                       fputs(fh, strcat("seta hud_", panel_name, "_complainbubble_color_outofammo \"", cvar_string(strcat("hud_", panel_name, "_complainbubble_color_outofammo")), "\"", "\n"));
+                                       fputs(fh, strcat("seta hud_", panel_name, "_complainbubble_color_donthave \"", cvar_string(strcat("hud_", panel_name, "_complainbubble_color_donthave")), "\"", "\n"));
+                                       fputs(fh, strcat("seta hud_", panel_name, "_complainbubble_color_unavailable \"", cvar_string(strcat("hud_", panel_name, "_complainbubble_color_unavailable")), "\"", "\n"));
                                        fputs(fh, strcat("seta hud_", panel_name, "_ammo_color \"", cvar_string(strcat("hud_", panel_name, "_ammo_color")), "\"", "\n"));
                                        fputs(fh, strcat("seta hud_", panel_name, "_ammo_alpha \"", cvar_string(strcat("hud_", panel_name, "_ammo_alpha")), "\"", "\n"));
                                        fputs(fh, strcat("seta hud_", panel_name, "_aspect \"", cvar_string(strcat("hud_", panel_name, "_ammo_alpha")), "\"", "\n"));
@@ -1582,15 +1585,15 @@ void HUD_WeaponIcons(void)
                        string s;
                        if(complain_weapon_type == 0) {
                                s = "Out of ammo";
-                               color = '1 0 0';
+                               color = autocvar_hud_weaponicons_complainbubble_color_outofammo;
                        }
                        else if(complain_weapon_type == 1) {
                                s = "Don't have";
-                               color = '1 1 0';
+                               color = autocvar_hud_weaponicons_complainbubble_color_donthave;
                        }
                        else {
                                s = "Unavailable";
-                               color = '1 1 1';
+                               color = autocvar_hud_weaponicons_complainbubble_color_unavailable;
                        }
                        drawpic_aspect_skin(wpnpos + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, "weapon_complainbubble", wpnsize - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
                        drawstring_aspect(wpnpos + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, s, wpnsize - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
@@ -3224,15 +3227,13 @@ void HUD_Score(void)
                                pl = world;
 
                score = me.(scores[ps_primary]);
-               timer = seconds_tostring(score/TIME_FACTOR);
-               timer = strcat(timer, ":", ftos_decimals(mod(score, TIME_FACTOR), log(TIME_FACTOR)));
+               timer = TIME_ENCODED_TOSTRING(score);
 
                if (pl && ((!(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)) || score)) {
                        // distribution display
                        distribution = me.(scores[ps_primary]) - pl.(scores[ps_primary]);
 
-                       distrtimer = seconds_tostring(distribution/TIME_FACTOR);
-                       distrtimer = strcat(timer, ":", ftos_decimals(mod(distribution, TIME_FACTOR), log(TIME_FACTOR)));
+                       distrtimer = ftos(distribution/pow(10, TIME_DECIMALS));
 
                        if (distribution <= 0) {
                                distribution_color = '0 1 0';