X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fshownames.qc;h=2fc1559494728343e27fed7b3282f2c37d668a0e;hb=a692581c23cc689f1f695dd04b6b2a2b27a567f0;hp=2dbd8efa2760a437cd58bef57b9f7273a8a7b576;hpb=50d6cb6a02a959a7303b5b687631b664a807b26f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 2dbd8efa2..2fc155949 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -2,6 +2,7 @@ #include "autocvars.qh" #include "miscfunctions.qh" +#include "resources.qh" #include "hud/_mod.qh" #include @@ -37,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) @@ -117,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)