]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qh
Merge branch 'master' into terencehill/quickmenu
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qh
index 46bc0efbf2680c04ac678ec86a9cc41c0cd02fc9..f733e296801919a4f9550973ef11fc898c27b583 100644 (file)
@@ -9,6 +9,7 @@ string hud_panelorder_prev;
 
 float hud_draw_maximized;
 float hud_panel_radar_maximized;
+float hud_panel_quickmenu;
 float chat_panel_modified;
 float radar_panel_modified;
 
@@ -96,6 +97,8 @@ var string panel_bg_padding_str;
 
 float current_player;
 
+float mv_active;
+
 
 #define HUD_PANELS \
        HUD_PANEL(WEAPONS      , HUD_Weapons      , weapons) \
@@ -114,11 +117,13 @@ float current_player;
        HUD_PANEL(ENGINEINFO   , HUD_EngineInfo   , engineinfo) \
        HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages) \
        HUD_PANEL(PHYSICS      , HUD_Physics      , physics) \
-       HUD_PANEL(CENTERPRINT  , HUD_CenterPrint  , centerprint)
+       HUD_PANEL(CENTERPRINT  , HUD_CenterPrint  , centerprint) \
+       HUD_PANEL(BUFFS        , HUD_Buffs        , buffs) \
+       HUD_PANEL(QUICKMENU    , HUD_QuickMenu    , quickmenu) 
 
 #define HUD_PANEL(NAME,draw_func,name) \
        float HUD_PANEL_##NAME; \
-       void ##draw_func(void); \
+       void draw_func(void); \
        void RegisterHUD_Panel_##NAME() \
        { \
                HUD_PANEL_LAST = HUD_PANEL_##NAME = HUD_PANEL_NUM; \
@@ -127,7 +132,7 @@ float current_player;
                hud_panelent.classname = "hud_panel"; \
                hud_panelent.panel_name = #name; \
                hud_panelent.panel_id = HUD_PANEL_##NAME; \
-               hud_panelent.panel_draw = ##draw_func; \
+               hud_panelent.panel_draw = draw_func; \
                ++HUD_PANEL_NUM; \
        } \
        ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME);
@@ -188,7 +193,7 @@ if((teamplay) && panel_bg_color_team) {\
                if(panel_bg_color_str == "shirt") {\
                        panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player - 1, "colors")) / 16), 0);\
                } else if(panel_bg_color_str == "pants") {\
-                       panel_bg_color = colormapPaletteColor(mod(stof(getplayerkeyvalue(current_player - 1, "colors")), 16), 1);\
+                       panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player - 1, "colors")) % 16, 1);\
                } else {\
                        panel_bg_color = stov(panel_bg_color_str);\
                }\
@@ -337,14 +342,16 @@ panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_bo
 HUD_Panel_GetBorder() \
 } ENDS_WITH_CURLY_BRACE
 
+#define NOTIFY_MAX_ENTRIES 10
+#define NOTIFY_ICON_MARGIN 0.02
 
-#define KN_MAX_ENTRIES 10
+float notify_index;
+float notify_count;
+float notify_times[NOTIFY_MAX_ENTRIES];
+string notify_attackers[NOTIFY_MAX_ENTRIES];
+string notify_victims[NOTIFY_MAX_ENTRIES];
+string notify_icons[NOTIFY_MAX_ENTRIES];
 
-float kn_index;
-float notify_times[KN_MAX_ENTRIES];
-string notify_icon[KN_MAX_ENTRIES];
-string notify_attackers[KN_MAX_ENTRIES];
-string notify_victims[KN_MAX_ENTRIES];
 void HUD_Notify_Push(string icon, string attacker, string victim);
 
 var void HUD_ModIcons_GameType(vector pos, vector size);