]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Merge branch 'master' into TimePath/debug_draw
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 5ead970345f2b10a4d7152c1a86c822263cd9c6f..070bcbff17b75d55b17d8779dd872eed6af0f46c 100644 (file)
@@ -13,7 +13,8 @@
 #include "../common/nades/all.qh"
 #include "../common/stats.qh"
 #include "../lib/csqcmodel/cl_player.qh"
-#include "../server/mutators/gamemode_ctf.qh"
+// TODO: remove
+#include "../server/mutators/mutator/gamemode_ctf.qc"
 
 
 /*
@@ -338,8 +339,9 @@ int weaponorder_cmp(int i, int j, entity pass)
        return aj - ai; // the string is in REVERSE order (higher prio at the right is what we want, but higher prio first is the string)
 }
 
-void HUD_Weapons(void)
-{SELFPARAM();
+void HUD_Weapons()
+{
+       SELFPARAM();
        // declarations
        WepSet weapons_stat = WepSet_GetFromStat();
        int i;
@@ -720,7 +722,7 @@ void HUD_Weapons(void)
                                        break;
 
                                case 3: // weapon name
-                                       drawstring(weapon_pos, strtolower(self.message), label_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                                       drawstring(weapon_pos, strtolower(self.m_name), label_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                                        break;
 
                                default: // nothing
@@ -844,8 +846,9 @@ 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;
+       Nade def = Nades_from(bonusType);
+       vector nadeColor    = def.m_color;
+       string nadeIcon     = def.m_icon;
 
        vector iconPos, textPos;
 
@@ -2219,7 +2222,7 @@ void HUD_Radar(void)
                                drawpic(coord - '8 8 0', "gfx/teamradar_icon_glow", '16 16 0', brightcolor, panel_fg_alpha, 0);
                        }
                }
-               entity icon = RadarIcons[tm.teamradar_icon];
+               entity icon = RadarIcons_from(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")); )
@@ -4832,7 +4835,7 @@ void HUD_Main(void)
        hud_draw_maximized = 0;
        // draw panels in the order specified by panel_order array
        for(i = hud_panels_COUNT - 1; i >= 0; --i)
-               HUD_Panel_Draw(hud_panels[panel_order[i]]);
+               HUD_Panel_Draw(hud_panels_from(panel_order[i]));
 
        HUD_Vehicle();