]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/radar.qc
Clear out .health and .armorvalue from the client side
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / radar.qc
index 10b6708e1e3f9c1e6c266f1839809a8876add2a9..9959ad977e1a3cd2b5b97691dbdd2a6c514c56f8 100644 (file)
@@ -1,5 +1,8 @@
 #include "radar.qh"
 
+#include <client/autocvars.qh>
+#include <client/defs.qh>
+#include <client/miscfunctions.qh>
 #include <common/ent_cs.qh>
 #include <common/mapinfo.qh>
 #include <client/mapvoting.qh>
@@ -211,9 +214,7 @@ void HUD_Radar()
                        panel_bg = "gfx/hud/default/border_default"; // fallback
                if(!radar_panel_modified && panel_bg != panel.current_panel_bg)
                        radar_panel_modified = true;
-               if(panel.current_panel_bg)
-                       strunzone(panel.current_panel_bg);
-               panel.current_panel_bg = strzone(panel_bg);
+               strcpy(panel.current_panel_bg, panel_bg);
 
                switch(hud_panel_radar_maximized_zoommode)
                {
@@ -351,7 +352,7 @@ void HUD_Radar()
 
        IL_EACH(g_radaricons, it.teamradar_icon, {
                if ( hud_panel_radar_mouse )
-               if ( it.health >= 0 )
+               if ( GetResourceAmount(it, RESOURCE_HEALTH) >= 0 )
                if ( it.team == myteam + 1 || gametype == MAPINFO_TYPE_RACE || !teamplay )
                {
                        vector coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(it.origin));