]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix hud_shownames_antioverlap not ignoring spectators
authorterencehill <piuntn@gmail.com>
Fri, 2 Dec 2016 15:55:48 +0000 (16:55 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 2 Dec 2016 15:55:48 +0000 (16:55 +0100)
qcsrc/client/shownames.qc

index 6a4515ac14f128f4b20eba195a090b849a0a138c..add8992aab64f6d74e5305f13fbbe7cd9318aa47 100644 (file)
@@ -55,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;