From 5b0c457b63716b29543c6e6f7067938919df8278 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 1 Nov 2020 12:21:54 +0100 Subject: [PATCH] Fix distance check --- qcsrc/client/shownames.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.39.2