]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Use a different cvar setting for showing enemies or team mates
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 11:34:13 +0000 (14:34 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 11:34:13 +0000 (14:34 +0300)
data/defaultVT.cfg
data/qcsrc/client/shownames.qc

index 4d2f97e42ee6b58c8ddf303592d9135dbbae14dd..9b32b871e9dcc43b1eacb90dc2fee0d9ff9e6d55 100644 (file)
@@ -1148,8 +1148,7 @@ seta hud_contents_water_color "0.4 0.3 0.3"
 seta hud_contents_stomach_alpha 0.2 "alpha of the stomach color blend when inside it"\r
 seta hud_contents_stomach_color "0.3 0.2 0"\r
 \r
-seta hud_shownames 1 "draw names and health/armor of nearby players"\r
-seta hud_shownames_enemies 2 "1 = draw names of enemies you point at (TODO), 2 = draw names of all enemies in view"\r
+seta hud_shownames 2 "1 = draw names of nearby team mates, 2 = also draw names of nearby enemies"\r
 seta hud_shownames_status 2 "1 = show when the team mate can be healed, 2 = also show health, 3 = also show armor"\r
 seta hud_shownames_aspect 8 "aspect ratio of total drawing area per name"\r
 seta hud_shownames_fontsize 12 "font size"\r
index a1ed5f9990e2959a52c03ccb3e69e0b8b5f83904..35fdd1a6b11cf030fce7e01650bffc5034795bb1 100644 (file)
@@ -20,7 +20,7 @@ void Draw_ShowNames(entity ent)
        if(teamplay && (GetPlayerColor(player_localentnum - 1) == GetPlayerColor(ent.sv_entnum - 1)))
                sameteam = TRUE;
 
-       if(sameteam || (!sameteam && cvar("hud_shownames_enemies")))
+       if(sameteam || (!sameteam && cvar("hud_shownames") > 1))
        {
                ent.origin_z += cvar("hud_shownames_offset");
 
@@ -29,18 +29,7 @@ void Draw_ShowNames(entity ent)
                        ent.origin_z -= (g_healthsize - ent.healthvalue) * cvar("hud_shownames_offset_healthsize");
 
                if(!sameteam)
-               {
-                       /* WIP, why does trace_ent != ent not work as intended here?
-                          if(cvar("hud_shownames_enemies") != 2) // player has to point at enemy if so
-                          {
-                          traceline(view_origin, view_origin + view_forward * MAX_SHOT_DISTANCE, MOVETYPE_FLY, world);
-                          print("trace_endpos: ", vtos(trace_endpos), " view_origin: ", vtos(view_origin), "\n");
-                          if(trace_ent != ent)
-                          return;
-                          }*/
-
                        traceline(ent.origin, view_origin, 1, ent);
-               }
 
                vector o, eo;
                o = project_3d_to_2d(ent.origin);