diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4ac6743a01..9527fa524c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -761,6 +761,7 @@ namespace OpenSim.Region.Framework.Scenes { if (agent.ParentUUID != UUID.Zero) { + agent.ClearControls(); agent.ParentPart = null; // agent.ParentPosition = Vector3.Zero; // agent.ParentUUID = UUID.Zero; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5c76964fb5..ca63d040a1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4512,6 +4512,15 @@ namespace OpenSim.Region.Framework.Scenes ControllingClient.SendTakeControls(int.MaxValue, false, false); } + public void ClearControls() + { + IgnoredControls = ScriptControlled.CONTROL_ZERO; + lock (scriptedcontrols) + { + scriptedcontrols.Clear(); + } + } + private void UnRegisterSeatControls(UUID obj) { List takers = new List();