diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-11-04 14:59:23 -0800 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-11-04 14:59:23 -0800 |
commit | b806edf4ac47d18e1a43fb8dbb5fbcad8d13192f (patch) | |
tree | 26640bea40cb3913ab9d30ac99eeec936679a5ff /indra/newview/llagentui.cpp | |
parent | 8b4818430fc120443b9dc677ae10fd072fffb6e6 (diff) |
Redo Bao's broken merge
Diffstat (limited to 'indra/newview/llagentui.cpp')
-rw-r--r-- | indra/newview/llagentui.cpp | 5 |
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) { |