From d16f7df673def43dfe922689a8c301ffe034ecaa Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 19 Aug 2014 20:33:26 +0100 Subject: [PATCH] also send attachment pre-kills on crossings --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a1d40fdabb..a0c3ba985c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1900,22 +1900,35 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat( "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); + List kk = new List(); + // Resume scripts this possible should also be moved down after sending the avatar to viewer ? foreach (SceneObjectGroup sog in m_attachments) { + foreach (SceneObjectPart part in sog.Parts) + kk.Add(part.LocalId); + + sog.SendFullUpdateToClient(ControllingClient); + SendFullUpdateToClient(ControllingClient); + // sog.ScheduleGroupForFullUpdate(); m_scene.ForEachScenePresence(delegate(ScenePresence p) { - if (p != this && sog.HasPrivateAttachmentPoint) + if (p == this) + return; + if (sog.HasPrivateAttachmentPoint) return; if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) return; + + p.ControllingClient.SendKillObject(kk); sog.SendFullUpdateToClient(p.ControllingClient); SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path }); sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); sog.ResumeScripts(); + kk.Clear(); } } }