]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/hud.qc
Merge branch 'master' into terencehill/hud_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qc
index f73ee92c6324ed075cac5afa5f9062bb3df11290..d200e2c6c522e67f05b009f301f9a03f5677d9db 100644 (file)
@@ -6,7 +6,7 @@
 #include "../teamradar.qh"
 #include <common/t_items.qh>
 #include <common/deathtypes/all.qh>
-#include <common/items/all.qc>
+#include <common/items/_mod.qh>
 #include <common/mapinfo.qh>
 #include <common/vehicles/all.qh>
 #include <common/mutators/mutator/waypoints/all.qh>
@@ -335,8 +335,6 @@ void DrawNumIcon(vector myPos, vector mySize, float x, string icon, bool vertica
        DrawNumIcon_expanding(myPos, mySize, x, icon, vertical, icon_right_align, color, theAlpha, 0);
 }
 
-#include "all.inc"
-
 /*
 ==================
 Main HUD system
@@ -358,20 +356,32 @@ void HUD_Vehicle()
        }
 }
 
+bool HUD_Minigame_Showpanels();
+
 void HUD_Panel_Draw(entity panent)
 {
        panel = panent;
-       if (autocvar__hud_configure && panel.panel_configflags & PANEL_CONFIG_MAIN)
+       if (autocvar__hud_configure)
        {
+               if (!(panel.panel_configflags & PANEL_CONFIG_MAIN))
+                       return;
+               panel_fade_alpha = 1;
+               Hud_Panel_GetPanelEnabled();
                panel.panel_draw();
                return;
        }
 
        bool draw_allowed = false;
-       if ((panel.panel_showflags & PANEL_SHOW_MINIGAME) && HUD_Minigame_Showpanels())
-               draw_allowed = true;
-       else if((panel.panel_showflags & PANEL_SHOW_MAPVOTE) && intermission == 2)
-               draw_allowed = true;
+       if (HUD_Minigame_Showpanels())
+       {
+               if (panel.panel_showflags & PANEL_SHOW_MINIGAME)
+                       draw_allowed = true;
+       }
+       else if(intermission == 2)
+       {
+               if(panel.panel_showflags & PANEL_SHOW_MAPVOTE)
+                       draw_allowed = true;
+       }
        else if (panel.panel_showflags & PANEL_SHOW_MAINGAME)
                draw_allowed = true;
 
@@ -423,6 +433,7 @@ bool Hud_Shake_Update()
        return true;
 }
 
+entity CSQCModel_server2csqc(int i);
 void calc_followmodel_ofs(entity view);
 void Hud_Dynamic_Frame()
 {
@@ -545,11 +556,11 @@ void HUD_Main()
                {
                        string hud_dock_color = autocvar_hud_dock_color;
                        if(hud_dock_color == "shirt") {
-                               f = stof(getplayerkeyvalue(current_player, "colors"));
+                               f = entcs_GetClientColors(current_player);
                                color = colormapPaletteColor(floor(f / 16), 0);
                        }
                        else if(hud_dock_color == "pants") {
-                               f = stof(getplayerkeyvalue(current_player, "colors"));
+                               f = entcs_GetClientColors(current_player);
                                color = colormapPaletteColor(f % 16, 1);
                        }
                        else