summaryrefslogtreecommitdiff
path: root/indra/newview/llagentui.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-11-03 18:19:45 -0800
committerSteve Bennetts <steve@lindenlab.com>2009-11-03 18:19:45 -0800
commit3e3ef5c53d2e73c0836ef6056d222c4c35b8ac2d (patch)
tree81c0151e33702653fb5533e9e10ca41cc906fa7a /indra/newview/llagentui.cpp
parentce3dfcee3bec1ad782128ea891e21130911c9984 (diff)
parentde2fe92bb9df5f5f64dff79a4e6df35330c15329 (diff)
merge from https://hg.aws.productengine.com/secondlife/viewer-2-0/
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)
{