From: terencehill Date: Wed, 19 Sep 2018 22:13:00 +0000 (+0200) Subject: Display name above player's head for a second when changing spectated player if 3rd... X-Git-Tag: xonotic-v0.8.5~1845^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F594%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Display name above player's head for a second when changing spectated player if 3rd person camera is active --- 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)