From: FruitieX Date: Sat, 14 May 2011 19:53:56 +0000 (+0300) Subject: fix some things that i forgot X-Git-Tag: xonotic-v0.5.0~254 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e8cd6134db0c68cf6b6381a92d2b53cb2511469f;p=xonotic%2Fxonotic-data.pk3dir.git fix some things that i forgot --- diff --git a/gfx/hud/default/nametag_statusbar.tga b/gfx/hud/default/nametag_statusbar.tga new file mode 100644 index 000000000..2bda90913 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 index 000000000..2bda90913 Binary files /dev/null and b/gfx/hud/luminos/nametag_statusbar.tga differ diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index f132bfa66..caf99d55c 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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); } } } diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index d7e4905e4..6b37f80d4 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -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)))