From 984cf943757b15f05c2cfcb540c6647754a531e7 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 3 Feb 2009 19:36:57 +0000 Subject: * Lock the parts for the old group while we're clearing it as well - not much point doing one without the other * Shouldn't result in any deadlocks as I don't think there are any locks in the calling code --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8cd0bf2..8fb94b0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3097,10 +3097,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScenePresence sp = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); if (sp != null) client = sp.ControllingClient; + SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target); + if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) return; // Fail silently if attached SceneObjectGroup parentPrim = null, childPrim = null; + if (targetPart != null) { if (parent != 0) { @@ -3118,10 +3121,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // if (uf != (Byte)0) // parent.RootPart.UpdateFlag = uf; } + parentPrim.TriggerScriptChangedEvent(Changed.LINK); parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); parentPrim.HasGroupChanged = true; parentPrim.ScheduleGroupForFullUpdate(); + if (client != null) parentPrim.GetProperties(client); -- cgit v1.1