diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f59ed2a22e..1473ec453c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1226,13 +1226,14 @@ namespace OpenSim.Region.Framework.Scenes Animator = null; Appearance = null; + /* temporary out: timming issues if(m_attachments != null) { foreach(SceneObjectGroup sog in m_attachments) sog.Dispose(); m_attachments = null; } - + */ scriptedcontrols.Clear(); ControllingClient = null; } @@ -1654,19 +1655,7 @@ namespace OpenSim.Region.Framework.Scenes */ public int GetStateSource() { -/* - AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(UUID); - - if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) - { - // This will get your attention - //m_log.Error("[XXX] Triggering CHANGED_TELEPORT"); - - return 5; // StateSource.Teleporting - } - return 2; // StateSource.PrimCrossing -*/ - return m_teleportFlags == TeleportFlags.Default ? 2 : 5; + return m_teleportFlags == TeleportFlags.Default ? 2 : 5; // StateSource.PrimCrossing : StateSource.Teleporting } /// @@ -2190,7 +2179,7 @@ namespace OpenSim.Region.Framework.Scenes catch { } finally { - m_updateAgentReceivedAfterTransferEvent.Reset(); + m_updateAgentReceivedAfterTransferEvent?.Reset(); } return false; @@ -4144,19 +4133,14 @@ namespace OpenSim.Region.Framework.Scenes TriggerScenePresenceUpdated(); } - public void SendCoarseLocations(List coarseLocations, List avatarUUIDs) - { - SendCoarseLocationsMethod d = m_sendCoarseLocationsMethod; - if (d != null) - { - d.Invoke(m_scene.RegionInfo.originRegionID, this, coarseLocations, avatarUUIDs); - } - } - public void SetSendCoarseLocationMethod(SendCoarseLocationsMethod d) { - if (d != null) - m_sendCoarseLocationsMethod = d; + m_sendCoarseLocationsMethod = d; + } + + public void SendCoarseLocations(List coarseLocations, List avatarUUIDs) + { + m_sendCoarseLocationsMethod?.Invoke(m_scene.RegionInfo.originRegionID, this, coarseLocations, avatarUUIDs); } public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p, List coarseLocations, List avatarUUIDs) @@ -4180,11 +4164,12 @@ namespace OpenSim.Region.Framework.Scenes private void SendInitialData() { - uint flags = ControllingClient.GetViewerCaps(); - if ((flags & 0x1000) == 0) // wait for seeds sending + //wait for region handshake + if (NeedInitialData < 2) return; - if (NeedInitialData < 2) + uint flags = ControllingClient.GetViewerCaps(); + if ((flags & 0x1000) == 0) // wait for seeds sending return; // give some extra time to make sure viewers did process seeds