From 3e475622b248407e2f7ad664ddf6881bd1db4f39 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 19 Dec 2015 23:27:07 +0100 Subject: [PATCH] A very trivial optimization --- 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 6897dad48..dcb6a0692 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -67,9 +67,9 @@ void Draw_ShowNames(entity this) )); } bool onscreen = (o.z >= 0 && o.x >= 0 && o.y >= 0 && o.x <= vid_conwidth && o.y <= vid_conheight); - float crosshairdistance = sqrt(pow(o.x - vid_conwidth / 2, 2) + pow(o.y - vid_conheight / 2, 2)); if (autocvar_hud_shownames_crosshairdistance) { + float crosshairdistance = sqrt(pow(o.x - vid_conwidth / 2, 2) + pow(o.y - vid_conheight / 2, 2)); if (autocvar_hud_shownames_crosshairdistance > crosshairdistance) this.pointtime = time; if (this.pointtime + autocvar_hud_shownames_crosshairdistance_time <= time) overlap = true; else overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : false); // override what antioverlap says unless allowed by cvar. -- 2.39.2