X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fshownames.qc;h=2dbd8efa2760a437cd58bef57b9f7273a8a7b576;hp=ceaf0a6748741c424e0985bcd83f9dac9219591d;hb=f8fe0e4aa8dad544f243ae997dfeb9cdccd55ee2;hpb=d5a954d00e5c66bd5e68eadef172e50cf392bc4c diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index ceaf0a6748..2dbd8efa27 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -1,5 +1,7 @@ #include "shownames.qh" +#include "autocvars.qh" +#include "miscfunctions.qh" #include "hud/_mod.qh" #include @@ -155,10 +157,10 @@ void Draw_ShowNames(entity this) this.healthvalue / autocvar_hud_panel_healtharmor_maxhealth, false, 1, '1 0 0', a, DRAWFLAG_NORMAL); } - if (this.armorvalue > 0) + if (GetResourceAmount(this, RESOURCE_ARMOR) > 0) { HUD_Panel_DrawProgressBar(pos + eX * 0.5 * mySize.x, sz, "nametag_statusbar", - this.armorvalue / autocvar_hud_panel_healtharmor_maxarmor, false, 0, '0 1 0', a, + GetResourceAmount(this, RESOURCE_ARMOR) / autocvar_hud_panel_healtharmor_maxarmor, false, 0, '0 1 0', a, DRAWFLAG_NORMAL); } } @@ -191,13 +193,13 @@ void Draw_ShowNames_All() if (entcs.m_entcs_private) { it.healthvalue = entcs.healthvalue; - it.armorvalue = entcs.armorvalue; + SetResourceAmountExplicit(it, RESOURCE_ARMOR, GetResourceAmount(entcs, RESOURCE_ARMOR)); it.sameteam = true; } else { it.healthvalue = 0; - it.armorvalue = 0; + SetResourceAmountExplicit(it, RESOURCE_ARMOR, 0); it.sameteam = false; } bool dead = entcs_IsDead(i) || entcs_IsSpectating(i);