]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Limit maximum possible distance at which shownames can be seen
authorMario <mario@smbclan.net>
Sun, 7 May 2017 00:48:55 +0000 (10:48 +1000)
committerMario <mario@smbclan.net>
Sun, 7 May 2017 00:48:55 +0000 (10:48 +1000)
qcsrc/client/shownames.qc

index e46a97cb1d9066d12ef5e53fefdc01a8dc376731..0500652b9a5c6802a442edf091a43857cdf219c7 100644 (file)
@@ -117,6 +117,7 @@ void Draw_ShowNames(entity this)
                if (!this.csqcmodel_isdead) a *= f;
        }
        if (a < ALPHA_MIN_VISIBLE && gametype != MAPINFO_TYPE_CTS) return;
+       if (vdist(this.origin - view_origin, >=, max_shot_distance)) return;
        if (autocvar_hud_shownames_maxdistance)
        {
                if (dist >= autocvar_hud_shownames_maxdistance) return;