]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qh
prevent a new "stealth electro" exploit ;)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qh
index e416da62aee32babca9ad8e437e039eda9c74575..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;
@@ -94,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) {\
@@ -113,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");\
+                       }\
                }\
        }\
 }