From 354ffcf94ecc909af082d5d5a5189f8190b5aa77 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 8 Dec 2008 07:18:30 +0000 Subject: [PATCH] * Fixes control issue at the root of the boat turning problem. --- .../Region/Environment/Scenes/ScenePresence.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index d363c6e482..30063eb4c0 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1342,6 +1342,18 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); if (part != null) { + TaskInventoryDictionary taskIDict = part.TaskInventory; + if (taskIDict != null) + { + lock (taskIDict) + { + foreach (UUID taskID in taskIDict.Keys) + { + UnRegisterControlEventsToScript(LocalId, taskID); + } + } + + } // Reset sit target. if (part.GetAvatarOnSitTarget() == UUID) part.SetAvatarOnSitTarget(UUID.Zero); @@ -3212,6 +3224,11 @@ namespace OpenSim.Region.Environment.Scenes { if (scriptedcontrols.ContainsKey(Script_item_UUID)) { + ScriptControllers takecontrolls = scriptedcontrols[Script_item_UUID]; + ScriptControlled sctc = takecontrolls.eventControls; + ControllingClient.SendTakeControls((int)sctc, false, false); + ControllingClient.SendTakeControls((int)sctc, true, false); + scriptedcontrols.Remove(Script_item_UUID); IgnoredControls = ScriptControlled.CONTROL_ZERO; foreach (ScriptControllers scData in scriptedcontrols.Values) @@ -3219,6 +3236,7 @@ namespace OpenSim.Region.Environment.Scenes IgnoredControls |= scData.ignoreControls; } } + } }