From: Mario Date: Sun, 7 May 2017 00:48:55 +0000 (+1000) Subject: Limit maximum possible distance at which shownames can be seen X-Git-Tag: xonotic-v0.8.5~2794 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2533e345655d737510e2320ee14be6efe37c1012;p=xonotic%2Fxonotic-data.pk3dir.git Limit maximum possible distance at which shownames can be seen --- diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index e46a97cb1..0500652b9 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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;