]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/healtharmor.qc
Dynamic HUD: Rework panel resizing/shifting in a cleaner way and implement proper...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / healtharmor.qc
index 83043293c5c60a60a4a46e3182f8620393cd4ba8..ffbd231eec4ecfa4b82bf9083094dd30d2ad9183 100644 (file)
@@ -1,3 +1,7 @@
+#include "healtharmor.qh"
+
+#include <common/deathtypes/all.qh>
+
 /** Health/armor (#3) */
 void HUD_HealthArmor()
 {
@@ -8,13 +12,13 @@ void HUD_HealthArmor()
                if(hud != HUD_NORMAL) return;
                if(spectatee_status == -1) return;
 
-               health = getstati(STAT_HEALTH);
+               health = STAT(HEALTH);
                if(health <= 0)
                {
                        prev_health = -1;
                        return;
                }
-               armor = getstati(STAT_ARMOR);
+               armor = STAT(ARMOR);
 
                // code to check for spectatee_status changes is in Ent_ClientData()
                // prev_p_health and prev_health can be set to -1 there
@@ -41,7 +45,7 @@ void HUD_HealthArmor()
                        prev_health = 0;
                        prev_armor = 0;
                }
-               fuel = getstati(STAT_FUEL);
+               fuel = STAT(FUEL);
        }
        else
        {
@@ -58,6 +62,7 @@ void HUD_HealthArmor()
        pos = panel_pos;
        mySize = panel_size;
 
+       HUD_Scale_Enable();
        HUD_Panel_DrawBg(1);
        if(panel_bg_padding)
        {