From 7e8320bada32b642058487b84af2c8355fc18292 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 17 Sep 2008 22:00:56 +0000 Subject: Kan-Ed fix series. Fix llTakeControls to behave as documented. XEngine fixes: prevent queue overruns, prevent spamming when no key is down. Release controls when conflicting permissions are requested or permissions are refused later. Release when prim or script are deleted. Fixes Scene script instance deletion semantics. --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 7 ++++--- OpenSim/Region/Environment/Scenes/Scene.cs | 2 ++ OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index cdd6943..7836937 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -879,12 +879,13 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectGroup group = part.ParentGroup; if (group != null) { - int type = group.RemoveInventoryItem(localID, itemID); - part.GetProperties(remoteClient); - if (type == 10) + TaskInventoryItem item = group.GetInventoryItem(localID, itemID); + if (item.Type == 10) { EventManager.TriggerRemoveScript(localID, itemID); } + group.RemoveInventoryItem(localID, itemID); + part.GetProperties(remoteClient); } else { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 78c8c62..8ee2179 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1742,6 +1742,8 @@ namespace OpenSim.Region.Environment.Scenes { //SceneObjectPart rootPart = group.GetChildPart(group.UUID); + group.RemoveScriptInstances(); + foreach (SceneObjectPart part in group.Children.Values) { if (part.PhysActor != null) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 514f6d8..5670492 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -958,7 +958,7 @@ namespace OpenSim.Region.Environment.Scenes { foreach (SceneObjectPart part in m_parts.Values) { - part.RemoveScriptInstances(); +// part.RemoveScriptInstances(); List avatars = Scene.GetScenePresences(); for (int i = 0; i < avatars.Count; i++) -- cgit v1.1