From e8a43b136be2effdbe580c8a1819ccbbe3eed677 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 10 Dec 2008 01:37:31 +0000 Subject: Applying diva's revert patch. Reverts closing child agents and makes TP more reliable again. --- OpenSim/Region/Environment/Scenes/Scene.cs | 15 ++------------- .../Environment/Scenes/SceneCommunicationService.cs | 19 ++++--------------- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 3 --- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3d21820..bef79f8 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2887,11 +2887,11 @@ namespace OpenSim.Region.Environment.Scenes capsPaths[agent.AgentID] = agent.CapsPath; - AddCapsHandler(agent.AgentID); - if (!agent.child) { + AddCapsHandler(agent.AgentID); + // Honor parcel landing type and position. ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); if (land != null) @@ -3108,18 +3108,7 @@ namespace OpenSim.Region.Environment.Scenes // } // Tell a single agent to disconnect from the region. - // This sends DisableSimulator over UDP, but that doesn't seem to be working - // well with the latest LL viewer, so we're sending it also via the EQ presence.ControllingClient.SendShutdownConnectionNotice(); - IEventQueue eq = RequestModuleInterface(); - if (eq != null) - { - OSD Item = EventQueueHelper.DisableSimulator(m_regInfo.RegionHandle); - eq.Enqueue(Item, agentID); - m_log.Debug("[Scene]: Enqueuing DisableSimulator for " + agentID + " in region " + m_regInfo.RegionName); - Thread.Sleep(2000); - } - RemoveCapsHandler(agentID); presence.ControllingClient.Close(true); } diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index c36c5ba..2b638e3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -675,7 +675,7 @@ namespace OpenSim.Region.Environment.Scenes // the avatar.Close below will clear the child region list. We need this below for (possibly) // closing the child agents, so save it here (we need a copy as it is Clear()-ed). - //List childRegions = new List(avatar.GetKnownRegionList()); + List childRegions = new List(avatar.GetKnownRegionList()); // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport // failure at this point (unlike a border crossing failure). So perhaps this can never fail // once we reach here... @@ -727,28 +727,17 @@ namespace OpenSim.Region.Environment.Scenes KiPrimitive(avatar.LocalId); } + avatar.Close(); uint newRegionX = (uint)(reg.RegionHandle >> 40); uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); - // Let's close some children agents - avatar.CloseChildAgents(newRegionX, newRegionY); - - avatar.Close(); - - // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone - - // This is a little too fast of a distance computation... it's not consistent with the rule - // of having child agents in exactly the adjacent regions. Some topologies result in orphan - // children - //if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) - //if (((int)Math.Abs((int)(newRegionX - oldRegionX)) > 1) || ((int)Math.Abs((int)(newRegionY - oldRegionY)) > 1)) - if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) + if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) { //SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); - //SendCloseChildAgentConnections(avatar.UUID, childRegions); + SendCloseChildAgentConnections(avatar.UUID, childRegions); CloseConnection(avatar.UUID); } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 30063eb..3bd6be9 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -2385,9 +2385,6 @@ namespace OpenSim.Region.Environment.Scenes CrossAttachmentsIntoNewRegion(neighbourHandle, true); - // Next, let's close the child agent connections that are too far away. - CloseChildAgents(neighbourx, neighboury); - // m_scene.SendKillObject(m_localId); m_scene.NotifyMyCoarseLocationChange(); -- cgit v1.1