From e8cd6134db0c68cf6b6381a92d2b53cb2511469f Mon Sep 17 00:00:00 2001 From: FruitieX Date: Sat, 14 May 2011 22:53:56 +0300 Subject: [PATCH] fix some things that i forgot --- gfx/hud/default/nametag_statusbar.tga | Bin 0 -> 260 bytes gfx/hud/luminos/nametag_statusbar.tga | Bin 0 -> 260 bytes qcsrc/client/shownames.qc | 4 ++-- qcsrc/server/cl_player.qc | 3 +-- 4 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 gfx/hud/default/nametag_statusbar.tga create mode 100644 gfx/hud/luminos/nametag_statusbar.tga diff --git a/gfx/hud/default/nametag_statusbar.tga b/gfx/hud/default/nametag_statusbar.tga new file mode 100644 index 0000000000000000000000000000000000000000..2bda909137d2b48759944ef965c49ba81f192954 GIT binary patch literal 260 zcmXw!K~BRk6hytKFo)pzK3NME_v?Rgta!y!8^Fo!4CtxXE_hYn|A|7H)c772_Xc8iSzo$zuOdW4PRNt s7}u22S~AY8#3~%qI?wa>Wmy&owtWBc?e%^CVUFhIdH4Bf4tphj0F>K$2><{9 literal 0 HcmV?d00001 diff --git a/gfx/hud/luminos/nametag_statusbar.tga b/gfx/hud/luminos/nametag_statusbar.tga new file mode 100644 index 0000000000000000000000000000000000000000..2bda909137d2b48759944ef965c49ba81f192954 GIT binary patch literal 260 zcmXw!K~BRk6hytKFo)pzK3NME_v?Rgta!y!8^Fo!4CtxXE_hYn|A|7H)c772_Xc8iSzo$zuOdW4PRNt s7}u22S~AY8#3~%qI?wa>Wmy&owtWBc?e%^CVUFhIdH4Bf4tphj0F>K$2><{9 literal 0 HcmV?d00001 diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index f132bfa66e..caf99d55cd 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 d7e4905e47..6b37f80d48 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))) -- 2.39.2