overlap = 0;
}
- float dist = vlen(this.origin - view_origin);
if (overlap == -1 && autocvar_hud_shownames_antioverlap)
{
// fade tag out if another tag that is closer to you overlaps
if (eo.z < 0 || eo.x < 0 || eo.y < 0 || eo.x > vid_conwidth || eo.y > vid_conheight) continue;
eo.z = 0;
if (vdist(((eX * o.x + eY * o.y) - eo), <, autocvar_hud_shownames_antioverlap_distance)
- && vdist((it.origin - view_origin), <, dist))
+ && vlen2(it.origin - view_origin) < vlen2(this.origin - view_origin))
{
overlap = 1;
break;
}
if (a < ALPHA_MIN_VISIBLE && gametype != MAPINFO_TYPE_CTS) return;
if (vdist(this.origin - view_origin, >=, max_shot_distance)) return;
+ float dist = vlen(this.origin - view_origin);
if (autocvar_hud_shownames_maxdistance)
{
if (dist >= autocvar_hud_shownames_maxdistance) return;