mantis 8253: don't let attachments delete remove controls from viewers on crossings.

0.9.0.1-postfixes
UbitUmarov 2017-11-12 12:00:03 +00:00
parent f2b54c8cf9
commit 6546ea6da6
2 changed files with 4 additions and 10 deletions

View File

@ -1178,6 +1178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; agent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
agent.SenderWantsToWaitForRoot = true; agent.SenderWantsToWaitForRoot = true;
//SetCallbackURL(agent, sp.Scene.RegionInfo); //SetCallbackURL(agent, sp.Scene.RegionInfo);
// Reset the do not close flag. This must be done before the destination opens child connections (here // Reset the do not close flag. This must be done before the destination opens child connections (here
@ -1877,7 +1878,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if(childRegionsToClose != null) if(childRegionsToClose != null)
agent.CloseChildAgents(childRegionsToClose); agent.CloseChildAgents(childRegionsToClose);
// this may need the attachments if((agent.crossingFlags & 8) == 0)
agent.ClearControls(); // don't let attachments delete (called in HasMovedAway) disturb taken controls on viewers
agent.HasMovedAway((agent.crossingFlags & 8) == 0); agent.HasMovedAway((agent.crossingFlags & 8) == 0);

View File

@ -2288,13 +2288,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
if(gotCrossUpdate)
{
if(IgnoredControls != ScriptControlled.CONTROL_ZERO)
ControllingClient.SendTakeControls((int)IgnoredControls, false, true);
}
m_log.DebugFormat("[CompleteMovement] attachments: {0}ms", Util.EnvironmentTickCountSubtract(ts)); m_log.DebugFormat("[CompleteMovement] attachments: {0}ms", Util.EnvironmentTickCountSubtract(ts));
if (openChildAgents) if (openChildAgents)
{ {
@ -5685,7 +5678,6 @@ namespace OpenSim.Region.Framework.Scenes
{ {
IgnoredControls = ScriptControlled.CONTROL_ZERO; IgnoredControls = ScriptControlled.CONTROL_ZERO;
obj.eventControls = (ScriptControlled)controls; obj.eventControls = (ScriptControlled)controls;
obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
} }
lock (scriptedcontrols) lock (scriptedcontrols)
@ -5801,7 +5793,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (scriptedcontrols.TryGetValue(Script_item_UUID, out takecontrols)) if (scriptedcontrols.TryGetValue(Script_item_UUID, out takecontrols))
{ {
ScriptControlled sctc = takecontrols.eventControls; ScriptControlled sctc = takecontrols.eventControls;
ControllingClient.SendTakeControls((int)sctc, false, false); ControllingClient.SendTakeControls((int)sctc, false, false);
ControllingClient.SendTakeControls((int)sctc, true, false); ControllingClient.SendTakeControls((int)sctc, true, false);