summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.h
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-31 23:39:09 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-31 23:39:09 +0800
commit3c464b4d8bb9bed58edc0418a8c91e8a609b5160 (patch)
treed67b823eefa09b3bb4c1be8182f79367e5f9fb72 /indra/newview/llagent.h
parentb81c1c4e871be0ff5e5dbbfa235571350cd477fe (diff)
Optimise arrival & departure notifications
by not having extra calls to getAvatars. The avatars' positions member had to be moved to an object that is accessible from VOAvatar too, and that would be the global Agent. It makes sense too, that it's the object that keeps the positions of other agents. It even has a section for positions too.
Diffstat (limited to 'indra/newview/llagent.h')
-rw-r--r--indra/newview/llagent.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index b475782946..a2d2ecea9f 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -195,6 +195,8 @@ public:
// Call once per frame to update position, angles (radians).
void updateAgentPosition(const F32 dt, const F32 yaw, const S32 mouse_x, const S32 mouse_y);
void setPositionAgent(const LLVector3 &center);
+ void setAvatarsPositions(const std::map<LLUUID, LLVector3d>& avatarsPositions);
+ const std::map<LLUUID, LLVector3d>& getAvatarsPositions() const { return mAvatarsPositions;}
boost::signals2::connection whenPositionChanged(position_signal_t::slot_type fn);
@@ -205,6 +207,7 @@ private:
position_signal_t mOnPositionChanged;
LLVector3d mLastTestGlobal;
+ std::map<LLUUID, LLVector3d> mAvatarsPositions;
//--------------------------------------------------------------------
// Velocity