]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/powerups.qc
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / powerups.qc
index 947bfd53b3ee1075063b72a489ece3b981811753..75fb0c2aaaf4009c80647750de6cbc8013413592 100644 (file)
@@ -1,12 +1,22 @@
 #include "powerups.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <common/items/_mod.qh>
+#include <common/util.qh>
 
 // Powerups (#2)
 
+void HUD_Powerups_Export(int fh)
+{
+       // allow saving cvars that aesthetically change the panel into hud skin files
+       HUD_Write_Cvar("hud_panel_powerups_iconalign");
+       HUD_Write_Cvar("hud_panel_powerups_baralign");
+       HUD_Write_Cvar("hud_panel_powerups_progressbar");
+       HUD_Write_Cvar("hud_panel_powerups_text");
+}
+
 // Powerup item fields (reusing existing fields)
 .string message;  // Human readable name
 .string netname;  // Icon name
@@ -103,7 +113,7 @@ void HUD_Powerups()
                addPowerupItem("Strength", "strength", autocvar_hud_progressbar_strength_color, strengthTime, 30);
        if(shieldTime)
                addPowerupItem("Shield", "shield", autocvar_hud_progressbar_shield_color, shieldTime, 30);
-       if(superTime)
+       if(superTime && !(allItems & IT_UNLIMITED_SUPERWEAPONS))
                addPowerupItem("Superweapons", "superweapons", autocvar_hud_progressbar_superweapons_color, superTime, 30);
 
        MUTATOR_CALLHOOK(HUD_Powerups_add);