]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/shownames.qc
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / shownames.qc
index 7c1ece5a3dc395c0afea7f4f2bfdfd8ab8519d4f..2fc1559494728343e27fed7b3282f2c37d668a0e 100644 (file)
@@ -38,8 +38,18 @@ const float SHOWNAMES_FADESPEED = 4;
 const float SHOWNAMES_FADEDELAY = 0.4;
 void Draw_ShowNames(entity this)
 {
-       if (this.sv_entnum == (current_player + 1))  // self or spectatee
-               if (!(autocvar_hud_shownames_self && autocvar_chase_active)) return;
+       if (this.sv_entnum == current_player + 1) // self or spectatee
+       {
+               if (!autocvar_chase_active)
+                       return;
+
+               if (!autocvar_hud_shownames_self
+                       && !(spectatee_status > 0 && time <= spectatee_status_changed_time + 1))
+               {
+                       return;
+               }
+       }
+
        if (!this.sameteam && !autocvar_hud_shownames_enemies) return;
        bool hit;
        if (!autocvar_hud_shownames_crosshairdistance && this.sameteam)
@@ -118,7 +128,7 @@ void Draw_ShowNames(entity this)
                // FIXME: alpha is negative when dead, breaking death fade
                if (!this.csqcmodel_isdead) a *= f;
        }
-       if (a < ALPHA_MIN_VISIBLE && gametype != MAPINFO_TYPE_CTS) return;
+       if (a < ALPHA_MIN_VISIBLE && ISGAMETYPE(CTS)) return;
        if (vdist(this.origin - view_origin, >=, max_shot_distance)) return;
        float dist = vlen(this.origin - view_origin);
        if (autocvar_hud_shownames_maxdistance)