Optimize team color loading a bit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qh
index ef94976dcfec2ffcde6bf26377873d3084f8fb74..19cd36ddb0b0551bd4bc6833ef5b73f8be5da9d4 100644 (file)
@@ -54,6 +54,8 @@ float hud_fade_alpha;
 string hud_skin_path;
 string hud_skin_prev;
 
+vector myteamcolors;
+
 var vector progressbar_color;
 
 entity highlightedPanel_backup;
@@ -189,7 +191,7 @@ if((teamplay) && panel_bg_color_team) {\
        if(autocvar__hud_configure && myteam == NUM_SPECTATOR)\
                panel_bg_color = '1 0 0' * panel_bg_color_team;\
        else\
-               panel_bg_color = colormapPaletteColor(myteam, 1) * panel_bg_color_team;\
+               panel_bg_color = myteamcolors * panel_bg_color_team;\
 } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team) {\
        panel_bg_color = '1 0 0' * panel_bg_color_team;\
 } else {\