]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Display name above player's head for a second when changing spectated player if 3rd... 594/head
authorterencehill <piuntn@gmail.com>
Wed, 19 Sep 2018 22:13:00 +0000 (00:13 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 19 Sep 2018 22:13:00 +0000 (00:13 +0200)
qcsrc/client/shownames.qc

index 7c1ece5a3dc395c0afea7f4f2bfdfd8ab8519d4f..eac36c1ae8e2b6ceda0ef179deec7978d2207787 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)