From 3a8a93d59650f9a6f0d47a1db7076e9c3d50e9d6 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Mon, 2 Nov 2009 21:53:31 +0200 Subject: fix for EXT-1232 \"You are Here\" banner for Place Profile - Parcel Characteristics Note: Now distance check is not depend on Z coordinate --HG-- branch : product-engine --- indra/newview/llagentui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 09f7c49f23..41c8066aca 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -92,7 +92,10 @@ std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/) //static BOOL LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius) { - return (gAgent.getPositionAgent() - pole).length() < radius; + S32 delta_x = gAgent.getPositionAgent().mV[VX] - pole.mV[VX]; + S32 delta_y = gAgent.getPositionAgent().mV[VY] - pole.mV[VY]; + + return sqrt( delta_x* delta_x + delta_y* delta_y ) < radius; } BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region) { -- cgit v1.2.3