summaryrefslogtreecommitdiff
path: root/indra/newview/llagentui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagentui.cpp')
-rw-r--r--indra/newview/llagentui.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp
index 1a69f1d975..2911a35581 100644
--- a/indra/newview/llagentui.cpp
+++ b/indra/newview/llagentui.cpp
@@ -89,6 +89,14 @@ std::string LLAgentUI::buildSLURL(const bool escaped /*= true*/)
return slurl;
}
+//static
+BOOL LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 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)
{
LLViewerRegion* region = gAgent.getRegion();