From 3c464b4d8bb9bed58edc0418a8c91e8a609b5160 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 31 Jul 2025 23:39:09 +0800 Subject: 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. --- indra/newview/llagent.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llagent.h') 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 ¢er); + void setAvatarsPositions(const std::map& avatarsPositions); + const std::map& 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 mAvatarsPositions; //-------------------------------------------------------------------- // Velocity -- cgit v1.2.3