From 43cf184603389d188bbbac14e5f14022be658a1e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 26 Jul 2014 16:56:21 +0100 Subject: [PATCH] clear script controls on crossing (untested)(possible should be done elsewhere/othe way) --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 + OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++++++++ 2 files changed, 10 insertions(+) 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();