]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Radar icons: fix colour
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 1636b11e7d59d64842148bae48860a2f96534f12..b229917249f2347a611805fa67f12fa815569a11 100644 (file)
@@ -14,8 +14,9 @@
 #include "../common/deathtypes.qh"
 #include "../common/items/all.qc"
 #include "../common/mapinfo.qh"
-#include "../common/nades.qh"
+#include "../common/nades/all.qh"
 
+#include "../common/mutators/mutator/waypoints/all.qh"
 #include "../server/mutators/gamemode_ctf.qh"
 
 #include "../common/stats.qh"
@@ -858,8 +859,8 @@ void DrawAmmoNades(vector myPos, vector mySize, bool draw_expanding, float expan
        float bonusNades    = getstatf(STAT_NADE_BONUS);
        float bonusProgress = getstatf(STAT_NADE_BONUS_SCORE);
        float bonusType     = getstati(STAT_NADE_BONUS_TYPE);
-       vector nadeColor    = NADES[bonusType].m_color;
-       string nadeIcon     = NADES[bonusType].m_icon;
+       vector nadeColor    = Nades[bonusType].m_color;
+       string nadeIcon     = Nades[bonusType].m_icon;
 
        vector iconPos, textPos;
 
@@ -2240,8 +2241,8 @@ void HUD_Radar(void)
                                drawpic(coord - '8 8 0', "gfx/teamradar_icon_glow", '16 16 0', brightcolor, panel_fg_alpha, 0);
                        }
                }
-
-               draw_teamradar_icon(tm.origin, tm.teamradar_icon, tm, tm.teamradar_color, panel_fg_alpha);
+               entity icon = RadarIcons[tm.teamradar_icon];
+               draw_teamradar_icon(tm.origin, icon, tm, spritelookupcolor(tm, icon.netname, tm.teamradar_color), panel_fg_alpha);
        }
        for(tm = world; (tm = find(tm, classname, "entcs_receiver")); )
        {