From ad6f9422792f981cf1c4b240a2a443075624b614 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 21 Aug 2014 06:11:19 +0100 Subject: add filter sog updates --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 40 ++++++++++++++++++++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 -- 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 28758a9..dd5ee65 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2636,6 +2636,16 @@ namespace OpenSim.Region.Framework.Scenes m_rootPart.UpdateFlag = UpdateRequired.TERSE; } + if (IsAttachment) + { + ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar); + if (sp != null) + { + sp.SendAttachmentScheduleUpdate(this); + return; + } + } + SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) { @@ -2697,6 +2707,16 @@ namespace OpenSim.Region.Framework.Scenes return; // m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); + + if (IsAttachment) + { + ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar); + if (sp != null) + { + sp.SendAttachmentUpdate(this,UpdateRequired.FULL); + return; + } + } RootPart.SendFullUpdateToAllClients(); @@ -2720,6 +2740,16 @@ namespace OpenSim.Region.Framework.Scenes if (IsDeleted) return; + if (IsAttachment) + { + ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar); + if (sp != null) + { + sp.SendAttachmentUpdate(RootPart, UpdateRequired.TERSE); + return; + } + } + RootPart.SendTerseUpdateToAllClients(); } @@ -2739,6 +2769,16 @@ namespace OpenSim.Region.Framework.Scenes if (IsDeleted) return; + if (IsAttachment) + { + ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar); + if (sp != null) + { + sp.SendAttachmentUpdate(this, UpdateRequired.TERSE); + return; + } + } + SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) parts[i].SendTerseUpdateToAllClients(); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ea09379..34d0eaa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1916,7 +1916,6 @@ namespace OpenSim.Region.Framework.Scenes if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) return; - p.ControllingClient.SendPartFullUpdate(sog.RootPart,LocalId + 1); sog.SendFullUpdateToClient(p.ControllingClient); SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path }); @@ -4748,7 +4747,6 @@ namespace OpenSim.Region.Framework.Scenes { if (p == this || !sog.HasPrivateAttachmentPoint) { - p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId +1 ); sog.SendFullUpdateToClient(p.ControllingClient); } } -- cgit v1.1