summaryrefslogtreecommitdiff
path: root/indra/newview/llagentui.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-11-04 16:13:07 -0800
committerRick Pasetto <rick@lindenlab.com>2009-11-04 16:13:07 -0800
commite1c5abce9309a89bd9993264bca8dadadf882c6f (patch)
tree81e1f91811b207abd4dfe4c82db31583d92df212 /indra/newview/llagentui.cpp
parent33eac5dc0a1dfc0624dcfc75bec35155fbb9c917 (diff)
parent0bd2567bf5648808a95c7826581199bb371597cb (diff)
merge with remote repo
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)
{