]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix some things that i forgot
authorFruitieX <fruitiex@gmail.com>
Sat, 14 May 2011 19:53:56 +0000 (22:53 +0300)
committerFruitieX <fruitiex@gmail.com>
Sat, 14 May 2011 19:53:56 +0000 (22:53 +0300)
gfx/hud/default/nametag_statusbar.tga [new file with mode: 0644]
gfx/hud/luminos/nametag_statusbar.tga [new file with mode: 0644]
qcsrc/client/shownames.qc
qcsrc/server/cl_player.qc

diff --git a/gfx/hud/default/nametag_statusbar.tga b/gfx/hud/default/nametag_statusbar.tga
new file mode 100644 (file)
index 0000000..2bda909
Binary files /dev/null and b/gfx/hud/default/nametag_statusbar.tga differ
diff --git a/gfx/hud/luminos/nametag_statusbar.tga b/gfx/hud/luminos/nametag_statusbar.tga
new file mode 100644 (file)
index 0000000..2bda909
Binary files /dev/null and b/gfx/hud/luminos/nametag_statusbar.tga differ
index f132bfa66e1963d809fd2e227950276bc78e75ea..caf99d55cd65b6acebe46cd5841910f1e9543b14 100644 (file)
@@ -115,10 +115,10 @@ void Draw_ShowNames()
                 {
                     if(self.healthvalue > 0)
                     {
-                        HUD_Panel_DrawProgressBar(namepos + '0 1 0' * autocvar_hud_shownames_fontsize * resize, eX * mySize_x + eY * resize * autocvar_hud_shownames_statusbar_height, "nametag_statusbar", self.healthvalue, 0, 0, '1 0 0', a, DRAWFLAG_NORMAL);
+                        HUD_Panel_DrawProgressBar(namepos + '0 1 0' * autocvar_hud_shownames_fontsize * resize, eX * 0.5 * mySize_x + eY * resize * autocvar_hud_shownames_statusbar_height, "nametag_statusbar", self.healthvalue/autocvar_hud_panel_healtharmor_maxhealth, 0, 1, '1 0 0', a, DRAWFLAG_NORMAL);
 
                         if(self.armorvalue > 0)
-                            HUD_Panel_DrawProgressBar(namepos + '0 1 0' * autocvar_hud_shownames_fontsize * resize + eY * resize * autocvar_hud_shownames_statusbar_height, eX * mySize_x + eY * resize * autocvar_hud_shownames_statusbar_height, "nametag_statusbar", self.armorvalue, 0, 0, '0 1 0', a, DRAWFLAG_NORMAL);
+                            HUD_Panel_DrawProgressBar(namepos + '0 1 0' * autocvar_hud_shownames_fontsize * resize + eX * 0.5 * mySize_x, eX * mySize_x + eY * resize * autocvar_hud_shownames_statusbar_height, "nametag_statusbar", self.armorvalue/autocvar_hud_panel_healtharmor_maxarmor, 0, 0, '0 1 0', a, DRAWFLAG_NORMAL);
                     }
                 }
             }
index d7e4905e475b07d4a4466e72dd19e7c46df180cf..6b37f80d48a410e9ff08776b949493faa7ee210b 100644 (file)
@@ -765,10 +765,9 @@ float SendEntity_ShowNames(entity to, float sendflags)
 void shownames_think()
 {
     self.origin = self.owner.origin + '0 0 1' * 48;
-    if(self.health != max(0, floor(self.owner.health)) || self.armorvalue != max(0, floor(self.owner.armorvalue)))
+    if(self.health != max(0, floor(self.owner.health)))
     {
         self.health = max(0, floor(self.owner.health));
-        self.armorvalue = max(0, floor(self.owner.armorvalue));
         self.SendFlags |= 1;
     }
     if(self.armorvalue != max(0, floor(self.owner.armorvalue)))