]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qh
Merge remote branch 'origin/fruitiex/fruitbalance'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qh
index 3c1f27107f47b6b73b904ae368f8cc93fbe7022c..e311c66a8aa923af4ac650897dad6b32524a9479 100644 (file)
@@ -33,6 +33,7 @@ float ts_primary, ts_secondary;
 
 float last_weapon;
 float weapontime;
+float weaponprevtime;
 
 float teamnagger;
 float hud_accuracy_hud;
@@ -54,6 +55,13 @@ string hud_skin_path;
 
 var vector progressbar_color;
 
+var float highlightedPanel_backup = -1;
+var vector panel_pos_backup;
+var vector panel_size_backup;
+
+var float highlightedPanel_copied = -1; //this is good only to know if there is something copied
+var vector panel_size_copied;
+
 var float active_panel; // this panel has recently referred the UpdateCvars macro
 var string panel_name;
 var float panel_enabled;
@@ -87,7 +95,7 @@ var string picpath;
 // ----------------------
 // MACRO HELL STARTS HERE
 // ----------------------
-// Little help for the poor people who have to make sense of this: Start from the bottom
+// Little help for the poor people who have to make sense of this: Start from the bottom ;)
 
 #define HUD_Panel_GetProgressBarColor(item) \
 switch(item) {\
@@ -106,18 +114,19 @@ if(!autocvar__hud_configure && panel_bg_str == "0") {\
        panel_bg = "0";\
 } else {\
        if(panel_bg_str == "") {\
-               panel_bg = autocvar_hud_panel_bg;\
-       } else if(panel_bg_str == "0" && autocvar__hud_configure) {\
-               panel_bg = autocvar_hud_panel_bg;\
-               panel_bg_alpha_str = "0";\
-       } else {\
-               panel_bg = panel_bg_str;\
+               panel_bg_str = autocvar_hud_panel_bg;\
        }\
-       panel_bg = strcat(hud_skin_path, "/", panel_bg);\
-       if(precache_pic(panel_bg) == "") {\
-               panel_bg = strcat(hud_skin_path, "/", "border");\
+       if(panel_bg_str == "0" && !autocvar__hud_configure) {\
+                       panel_bg = "0";\
+       } else {\
+               if (panel_bg_str == "0" && autocvar__hud_configure)\
+                       panel_bg_alpha_str = "0";\
+               panel_bg = strcat(hud_skin_path, "/", panel_bg_str);\
                if(precache_pic(panel_bg) == "") {\
-                       panel_bg = strcat("gfx/hud/default/", "border");\
+                       panel_bg = strcat(hud_skin_path, "/", "border_default");\
+                       if(precache_pic(panel_bg) == "") {\
+                               panel_bg = strcat("gfx/hud/default/", "border_default");\
+                       }\
                }\
        }\
 }