From: Mario Date: Mon, 28 Dec 2015 12:05:50 +0000 (+1000) Subject: Optimize maths X-Git-Tag: xonotic-v0.8.2~1373 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c35ce8c91ddfa87d77f1a9c0a61a71bb98694b63;p=xonotic%2Fxonotic-data.pk3dir.git Optimize maths --- diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 737535a08..050944dea 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -58,8 +58,8 @@ void Draw_ShowNames(entity this) vector eo = project_3d_to_2d(it.origin); if (eo.z < 0 || eo.x < 0 || eo.y < 0 || eo.x > vid_conwidth || eo.y > vid_conheight) continue; eo.z = 0; - if (vlen((eX * o.x + eY * o.y) - eo) < autocvar_hud_shownames_antioverlap_distance - && dist > vlen(it.origin - view_origin)) + if (vdist(((eX * o.x + eY * o.y) - eo), <, autocvar_hud_shownames_antioverlap_distance) + && vdist((it.origin - view_origin), <, dist)) { overlap = true; break;