From fb22b395c69466214e7f531adbbc96dc1a8b65ab Mon Sep 17 00:00:00 2001 From: FruitieX Date: Wed, 13 Apr 2011 15:16:52 +0300 Subject: [PATCH] only draw the question mark health/armor icons in teamplay games --- defaultXonotic.cfg | 2 +- qcsrc/client/shownames.qc | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index e71c8c2a2..a314e49b8 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1488,7 +1488,7 @@ seta hud_contents_water_color "0.4 0.3 0.3" seta hud_shownames 1 "draw names and health/armor of nearby players" seta hud_shownames_enemies 1 "also draw names of enemies" -seta hud_shownames_status 2 "1 = draw health/armor status of teammates, 2 = same as 1, but draw health/armor icons with a question mark on enemies" +seta hud_shownames_status 2 "1 = draw health/armor status of teammates, 2 = same as 1, but draw health/armor icons with a question mark on enemies in teamgames" seta hud_shownames_height 15 "height of icons" seta hud_shownames_aspect 8 "aspect ratio" seta hud_shownames_fontsize 8 "aspect ratio" diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index d5ad28a78..5492512d7 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -57,7 +57,7 @@ void Draw_ShowNames() drawpic_aspect_skin(iconpos + '0.5 0 0' * iconsize_x, "armor", '1 1 0' * iconsize_y, '1 1 1', a, DRAWFLAG_NORMAL); drawresetcliparea(); } - else if(autocvar_hud_shownames_status == 2) + else if(autocvar_hud_shownames_status == 2 && teamplay) { iconsize = eX * 2 * mySize_y + eY * mySize_y; drawpic_aspect_skin(iconpos, "health_unknown", '1 1 0' * iconsize_y, '0 0 0', a, DRAWFLAG_NORMAL); @@ -72,19 +72,6 @@ void Draw_ShowNames() s = GetPlayerName(self.the_entnum-1); s = textShortenToWidth(s, namesize, '1 1 0' * autocvar_hud_shownames_fontsize, stringwidth_colors); drawcolorcodedstring(namepos, s, '1 1 0' * autocvar_hud_shownames_fontsize, a, DRAWFLAG_NORMAL); - - /* Or maybe a health bar instead? - * - if(self.health >= 0) - { - float align; - if(self.build_finished) - align = 0.5; - else - align = 0; - drawhealthbar(o, rot * 90 * DEG2RAD, self.health, SPRITE_SIZE * t, SPRITE_HOTSPOT * t, SPRITE_HEALTHBAR_WIDTH * t, SPRITE_HEALTHBAR_HEIGHT * t, SPRITE_HEALTHBAR_MARGIN * t, SPRITE_HEALTHBAR_BORDER * t, align, self.teamradar_color, a * SPRITE_HEALTHBAR_BORDERALPHA, self.teamradar_color, a * SPRITE_HEALTHBAR_HEALTHALPHA, DRAWFLAG_NORMAL); - } - */ } } } -- 2.39.2