/// <summary> /// Send this agent's avatar data to all other root and child agents in the scene /// This agent must be root. This avatar will receive its own update. /// </summary> public void SendAvatarDataToAllAgents(bool sendAppearance) { // only send update from root agents to other clients; children are only "listening posts" if (m_sp.IsChildAgent) { MainConsole.Instance.Warn("[SCENEPRESENCE] attempt to send avatar data from a child agent"); return; } int count = 0; m_sp.Scene.ForEachScenePresence(delegate(IScenePresence scenePresence) { if (scenePresence.UUID != m_sp.UUID) { SendAvatarDataToAgent(scenePresence, sendAppearance); count++; } }); if (_updateMonitor != null) { _updateMonitor.AddAgentUpdates(count); } }
/// <summary> /// Send appearance from all other root agents to this agent. this agent /// can be either root or child /// </summary> public void SendOtherAgentsAppearanceToMe() { int count = 0; m_sp.Scene.ForEachScenePresence(delegate(IScenePresence scenePresence) { // only send information about root agents if (scenePresence.IsChildAgent) { return; } // only send information about other root agents if (scenePresence.UUID == m_sp.UUID) { return; } IAvatarAppearanceModule appearance = scenePresence.RequestModuleInterface <IAvatarAppearanceModule> (); if (appearance != null) { appearance.SendAppearanceToAgent(m_sp); } count++; }); IAgentUpdateMonitor reporter = (IAgentUpdateMonitor)m_sp.Scene.RequestModuleInterface <IMonitorModule> ().GetMonitor(m_sp.Scene.RegionInfo.RegionID.ToString(), "Agent Update Count"); if (reporter != null) { reporter.AddAgentUpdates(count); } }
/// <summary> /// Send this agent's appearance to all other root and child agents in the scene /// This agent must be root. /// </summary> public void SendAppearanceToAllOtherAgents() { // only send update from root agents to other clients; children are only "listening posts" if (m_sp.IsChildAgent) { m_log.Warn("[SCENEPRESENCE] attempt to send avatar data from a child agent"); return; } int count = 0; m_sp.Scene.ForEachScenePresence(delegate(IScenePresence scenePresence) { if (scenePresence.UUID == m_sp.UUID) { return; } SendAppearanceToAgent(scenePresence); count++; }); IAgentUpdateMonitor reporter = (IAgentUpdateMonitor)m_sp.Scene.RequestModuleInterface <IMonitorModule> ().GetMonitor(m_sp.Scene.RegionInfo.RegionID.ToString(), "Agent Update Count"); if (reporter != null) { reporter.AddAgentUpdates(count); } }