diff options
| author | Loren Shih <seraph@lindenlab.com> | 2009-11-06 18:31:52 -0500 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2009-11-06 18:31:52 -0500 |
| commit | 9c048d12fdd9fd9c95cc93223fc731ee7b548294 (patch) | |
| tree | 4d6e91028b4ab48b6600c34f9cf126610fbce690 /indra/newview/llagentui.cpp | |
| parent | 2aa981ac23bbdf2fd609e04434179be0cfec79ce (diff) | |
| parent | f3bbcfb9d41b41f8c4b144ae9a1173fc7719b88c (diff) | |
merge
--HG--
branch : avatar-pipeline
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) { |
