From dc7b9c1cc328084bf8f730337ae5c44005f935b9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 9 Aug 2014 15:12:02 +0100 Subject: dont do for children what is for growups ( root agents) ( needs check) --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 86 +++++++++++------------- 1 file changed, 39 insertions(+), 47 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8fae032..5acd51e 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 -- cgit v1.1 From 7fcd1068e742d88fbda94ae079e900424807d021 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 10 Aug 2014 20:09:02 +0100 Subject: TEST move parcelRegionCross to EntityTransferModule cross so it works on sitting avatars. (may be bad) comented out sending root avatars information to the child that was just a root it should have it all already. Dont turn a sitting avatar physical, that needs to be a stand at SOG --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5acd51e..d65c250 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3863,7 +3863,7 @@ namespace OpenSim.Region.Framework.Scenes protected bool CrossToNewRegion() { bool result = false; - parcelRegionCross(false); +// parcelRegionCross(false); try { result = m_scene.CrossAgentToNewRegion(this, Flying); @@ -3872,8 +3872,8 @@ namespace OpenSim.Region.Framework.Scenes { result = m_scene.CrossAgentToNewRegion(this, false); } - if(!result) - parcelRegionCross(true); + // if(!result) + // parcelRegionCross(true); return result; @@ -5531,7 +5531,7 @@ namespace OpenSim.Region.Framework.Scenes } } - private void parcelRegionCross(bool abort) + public void parcelRegionCross(bool abort) { if (!ParcelHideThisAvatar) return; -- cgit v1.1 From ba33d78af90ca0649ffb5150eadffc185bf224fe Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 01:44:12 +0100 Subject: dont do ParcelCrossCheck() on child avatars --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d65c250..6cd951d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -5611,6 +5611,9 @@ namespace OpenSim.Region.Framework.Scenes if (IsInTransit) return; + if (IsChildAgent) + return; + if (check) { // check is relative to current parcel only -- cgit v1.1 From 2cc8e90bd2079798b4e4538fefeb23ea3f81488e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 11 Aug 2014 02:51:34 +0100 Subject: remove a land.SendLandUpdateToClient() since its now done for all cases in completmovement and not only that specific one --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6cd951d..62dea07 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -5158,8 +5158,8 @@ namespace OpenSim.Region.Framework.Scenes pos = land.LandData.UserLocation; } } - - land.SendLandUpdateToClient(ControllingClient); +// this is now done in completeMovement for all cases and not just this +// land.SendLandUpdateToClient(ControllingClient); } } -- cgit v1.1