diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8fae032619..5acd51ec9d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1823,12 +1823,12 @@ namespace OpenSim.Region.Framework.Scenes Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); m_callbackURI = null; } - // else - // { - // m_log.DebugFormat( - // "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}", - // client.Name, client.AgentId, m_scene.RegionInfo.RegionName); - // } +// else +// { +// m_log.DebugFormat( +// "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}", +// client.Name, client.AgentId, m_scene.RegionInfo.RegionName); +// } m_previusParcelHide = false; m_previusParcelUUID = UUID.Zero; @@ -1838,59 +1838,51 @@ namespace OpenSim.Region.Framework.Scenes // send initial land overlay and parcel ILandChannel landch = m_scene.LandChannel; if (landch != null) - { landch.sendClientInitialLandInfo(client); - if (!IsChildAgent) - { - newhide = m_currentParcelHide; - m_currentParcelHide = false; - } - } - // send agentData to all clients including us (?) - // get appearance - // if in cache sent it to all clients - // send what we have to us, even if not in cache ( bad? ) - ValidateAndSendAppearanceAndAgentData(); - - // attachments - if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0) + if (!IsChildAgent) { - if (Scene.AttachmentsModule != null) + newhide = m_currentParcelHide; + m_currentParcelHide = false; + + ValidateAndSendAppearanceAndAgentData(); + + // attachments + if (isNPC || (TeleportFlags & TeleportFlags.ViaLogin) != 0) + { + if (Scene.AttachmentsModule != null) // Util.FireAndForget( // o => // { - Scene.AttachmentsModule.RezAttachments(this); -// }); - } - else - { - List attachments = GetAttachments(); - - if (attachments.Count > 0) + Scene.AttachmentsModule.RezAttachments(this); + // }); + } + else { - m_log.DebugFormat( - "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); + List attachments = GetAttachments(); - // Resume scripts this possible should also be moved down after sending the avatar to viewer ? - foreach (SceneObjectGroup sog in attachments) + if (attachments.Count > 0) { - sog.ScheduleGroupForFullUpdate(); - sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); - sog.ResumeScripts(); + m_log.DebugFormat( + "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); + + // Resume scripts this possible should also be moved down after sending the avatar to viewer ? + foreach (SceneObjectGroup sog in attachments) + { + sog.ScheduleGroupForFullUpdate(); + sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); + sog.ResumeScripts(); + } } } - } - // m_log.DebugFormat( - // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", - // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); - // Create child agents in neighbouring regions - if (openChildAgents && !IsChildAgent) - { - IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); - if (m_agentTransfer != null) - m_agentTransfer.EnableChildAgents(this); + // Create child agents in neighbouring regions + if (openChildAgents) + { + IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); + if (m_agentTransfer != null) + m_agentTransfer.EnableChildAgents(this); + } } // send the rest of the world