diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-07-31 23:39:09 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-07-31 23:39:09 +0800 |
commit | 3c464b4d8bb9bed58edc0418a8c91e8a609b5160 (patch) | |
tree | d67b823eefa09b3bb4c1be8182f79367e5f9fb72 /indra/newview/llagent.cpp | |
parent | b81c1c4e871be0ff5e5dbbfa235571350cd477fe (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.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f7b48d25f2..0cd343b46e 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1305,6 +1305,12 @@ const LLVector3 &LLAgent::getPositionAgent() return mFrameAgent.getOrigin(); } +void LLAgent::setAvatarsPositions(const std::map<LLUUID, LLVector3d>& avatarsPositions) +{ + mAvatarsPositions.clear(); + mAvatarsPositions = avatarsPositions; +} + boost::signals2::connection LLAgent::whenPositionChanged(position_signal_t::slot_type fn) { return mOnPositionChanged.connect(fn); |