From e96e9231596dc1c611f84b0dec6b9c5143d77012 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 14 Sep 2018 21:54:38 +0100 Subject: some teleport issues.. --- OpenSim/Region/Framework/Scenes/Scene.cs | 23 ++++++++--------------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 ++++++++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 15a0493..e638d9a 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4513,8 +4513,7 @@ Label_GroupsDone: "[SCENE]: update for {0} in {1} refused: Logins Disabled", cAgentData.AgentID, RegionInfo.RegionName); return false; } - // We have to wait until the viewer contacts this region after receiving EAC. - // That calls AddNewClient, which finally creates the ScenePresence + int flags = GetUserFlags(cAgentData.AgentID); if (RegionInfo.EstateSettings.IsBanned(cAgentData.AgentID, flags)) { @@ -4551,32 +4550,26 @@ Label_GroupsDone: if (cAgentData.SessionID != sp.ControllingClient.SessionId) { m_log.WarnFormat( - "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", - sp.UUID, cAgentData.SessionID); - - Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", - sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); + "[SCENE]: Attempt to update agent {0} with diferent session id {1} != {2}", + sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID); + return false; } sp.UpdateChildAgent(cAgentData); - int ntimes = 20; + int ntimes = 100; if (cAgentData.SenderWantsToWaitForRoot) { while (sp.IsChildAgent && ntimes-- > 0) - Thread.Sleep(1000); + Thread.Sleep(250); if (sp.IsChildAgent) + { m_log.WarnFormat( "[SCENE]: Found presence {0} {1} unexpectedly still child in {2}", sp.Name, sp.UUID, Name); - else - m_log.InfoFormat( - "[SCENE]: Found presence {0} {1} as root in {2} after {3} waits", - sp.Name, sp.UUID, Name, 20 - ntimes); - - if (sp.IsChildAgent) return false; + } } return true; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9c929a7..ed4cafa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1559,6 +1559,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void MakeChildAgent(ulong newRegionHandle) { + m_updateAgentReceivedAfterTransferEvent.Reset(); haveGroupInformation = false; gotCrossUpdate = false; crossingFlags = 0; @@ -2000,6 +2001,10 @@ namespace OpenSim.Region.Framework.Scenes } } catch { } + finally + { + m_updateAgentReceivedAfterTransferEvent.Reset(); + } return false; } @@ -2286,8 +2291,8 @@ namespace OpenSim.Region.Framework.Scenes { if (m_attachments.Count > 0) { - m_log.DebugFormat( - "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); foreach (SceneObjectGroup sog in m_attachments) { @@ -5713,6 +5718,7 @@ namespace OpenSim.Region.Framework.Scenes { IgnoredControls = ScriptControlled.CONTROL_ZERO; obj.eventControls = (ScriptControlled)controls; + obj.ignoreControls = ScriptControlled.CONTROL_ZERO; } lock (scriptedcontrols) -- cgit v1.1