From: terencehill Date: Sun, 1 Nov 2020 11:21:54 +0000 (+0100) Subject: Fix distance check X-Git-Tag: xonotic-v0.8.5~701 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5b0c457b63716b29543c6e6f7067938919df8278;p=xonotic%2Fxonotic-data.pk3dir.git Fix distance check --- diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index ed0d95c5f..af4d766ec 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -128,7 +128,7 @@ void Draw_ShowNames(entity this) float dist = -1; // dist will be calculated only when really needed to avoid wasting a vlen call if (autocvar_hud_shownames_maxdistance) { - float max_dist = max(autocvar_hud_shownames_maxdistance, max_shot_distance); + float max_dist = min(autocvar_hud_shownames_maxdistance, max_shot_distance); if (vdist(this.origin - view_origin, >=, max_dist)) return; if (vdist(this.origin - view_origin, >=, autocvar_hud_shownames_mindistance))