From c30c9863fce32b845bfd0fad4842b1d8b718fc2d Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 20 Sep 2018 00:13:00 +0200 Subject: [PATCH] Display name above player's head for a second when changing spectated player if 3rd person camera is active --- qcsrc/client/shownames.qc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 7c1ece5a3..eac36c1ae 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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) -- 2.39.2