summaryrefslogtreecommitdiff
path: root/indra/newview/llagentui.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-05 11:41:07 +0800
committerangela <angela@lindenlab.com>2009-11-05 11:41:07 +0800
commit95738da3d82b92e82744dbc6b377a3feae2e6441 (patch)
treecf1678c617ea644a14d20a40fbfc58f156fd9591 /indra/newview/llagentui.cpp
parent35c7c7a9b29ef4462ea969b393c25b59813ef169 (diff)
parentaf401ac6dc463db477210b0ff100014fbeb50a9a (diff)
merge
Diffstat (limited to 'indra/newview/llagentui.cpp')
-rw-r--r--indra/newview/llagentui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp
index 09f7c49f23..2911a35581 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;
+ F32 delta_x = gAgent.getPositionAgent().mV[VX] - pole.mV[VX];
+ F32 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)
{