X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fshownames.qc;h=add8992aab64f6d74e5305f13fbbe7cd9318aa47;hp=6700ba61c7b87cadfee0438093ffdf46a2d5ee7e;hb=a565bc91f697fabe7af6931ef7a37db97edd5ebd;hpb=8cbf0e84432e075e617f43c037c645ea9846eba0 diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 6700ba61c..add8992aa 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -1,9 +1,10 @@ #include "shownames.qh" -#include "hud/all.qh" +#include "hud/_mod.qh" #include #include +#include #include #include @@ -34,7 +35,7 @@ const float SHOWNAMES_FADESPEED = 4; const float SHOWNAMES_FADEDELAY = 0.4; void Draw_ShowNames(entity this) { - if (this.sv_entnum == player_localentnum) // self or spectatee + if (this.sv_entnum == (current_player + 1)) // self or spectatee if (!(autocvar_hud_shownames_self && autocvar_chase_active)) return; if (!this.sameteam && !autocvar_hud_shownames_enemies) return; bool hit; @@ -54,7 +55,11 @@ void Draw_ShowNames(entity this) if (autocvar_hud_shownames_antioverlap) { // fade tag out if another tag that is closer to you overlaps - LL_EACH(shownames_ent, it != this && entcs_receiver(i), { + entity entcs = NULL; + LL_EACH(shownames_ent, it != this, { + entcs = entcs_receiver(i); + if (!(entcs && entcs.has_sv_origin)) + continue; vector eo = project_3d_to_2d(it.origin); if (eo.z < 0 || eo.x < 0 || eo.y < 0 || eo.x > vid_conwidth || eo.y > vid_conheight) continue; eo.z = 0;