]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
only draw the question mark health/armor icons in teamplay games
authorFruitieX <fruitiex@gmail.com>
Wed, 13 Apr 2011 12:16:52 +0000 (15:16 +0300)
committerFruitieX <fruitiex@gmail.com>
Wed, 13 Apr 2011 12:16:52 +0000 (15:16 +0300)
defaultXonotic.cfg
qcsrc/client/shownames.qc

index e71c8c2a2546f7c0c14ef700aedd348a8f1de44d..a314e49b8ea8751a6bb76fe9411d0b67cb202ed4 100644 (file)
@@ -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"
index d5ad28a78a78db32a7c1a74f6f02c2ea635f7f9e..5492512d7738d82bda6da23207e46f6ce2e9be31 100644 (file)
@@ -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);
-            }
-            */
         }
     }
 }