diff options
author | Melanie Thielker | 2008-12-10 01:37:31 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-12-10 01:37:31 +0000 |
commit | e8a43b136be2effdbe580c8a1819ccbbe3eed677 (patch) | |
tree | ab629e64d2bc035276b1751d76252dd653e3de22 /OpenSim/Region | |
parent | * Enable agent to agent transfer of inventory folders (diff) | |
download | opensim-SC_OLD-e8a43b136be2effdbe580c8a1819ccbbe3eed677.zip opensim-SC_OLD-e8a43b136be2effdbe580c8a1819ccbbe3eed677.tar.gz opensim-SC_OLD-e8a43b136be2effdbe580c8a1819ccbbe3eed677.tar.bz2 opensim-SC_OLD-e8a43b136be2effdbe580c8a1819ccbbe3eed677.tar.xz |
Applying diva's revert patch. Reverts closing child agents and makes
TP more reliable again.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 19 | ||||
-rw-r--r-- | 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 | |||
2887 | 2887 | ||
2888 | capsPaths[agent.AgentID] = agent.CapsPath; | 2888 | capsPaths[agent.AgentID] = agent.CapsPath; |
2889 | 2889 | ||
2890 | AddCapsHandler(agent.AgentID); | ||
2891 | |||
2892 | if (!agent.child) | 2890 | if (!agent.child) |
2893 | { | 2891 | { |
2894 | 2892 | ||
2893 | AddCapsHandler(agent.AgentID); | ||
2894 | |||
2895 | // Honor parcel landing type and position. | 2895 | // Honor parcel landing type and position. |
2896 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | 2896 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); |
2897 | if (land != null) | 2897 | if (land != null) |
@@ -3108,18 +3108,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3108 | // } | 3108 | // } |
3109 | 3109 | ||
3110 | // Tell a single agent to disconnect from the region. | 3110 | // Tell a single agent to disconnect from the region. |
3111 | // This sends DisableSimulator over UDP, but that doesn't seem to be working | ||
3112 | // well with the latest LL viewer, so we're sending it also via the EQ | ||
3113 | presence.ControllingClient.SendShutdownConnectionNotice(); | 3111 | presence.ControllingClient.SendShutdownConnectionNotice(); |
3114 | IEventQueue eq = RequestModuleInterface<IEventQueue>(); | ||
3115 | if (eq != null) | ||
3116 | { | ||
3117 | OSD Item = EventQueueHelper.DisableSimulator(m_regInfo.RegionHandle); | ||
3118 | eq.Enqueue(Item, agentID); | ||
3119 | m_log.Debug("[Scene]: Enqueuing DisableSimulator for " + agentID + " in region " + m_regInfo.RegionName); | ||
3120 | Thread.Sleep(2000); | ||
3121 | } | ||
3122 | RemoveCapsHandler(agentID); | ||
3123 | 3112 | ||
3124 | presence.ControllingClient.Close(true); | 3113 | presence.ControllingClient.Close(true); |
3125 | } | 3114 | } |
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 | |||
675 | 675 | ||
676 | // the avatar.Close below will clear the child region list. We need this below for (possibly) | 676 | // the avatar.Close below will clear the child region list. We need this below for (possibly) |
677 | // closing the child agents, so save it here (we need a copy as it is Clear()-ed). | 677 | // closing the child agents, so save it here (we need a copy as it is Clear()-ed). |
678 | //List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList()); | 678 | List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList()); |
679 | // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport | 679 | // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport |
680 | // failure at this point (unlike a border crossing failure). So perhaps this can never fail | 680 | // failure at this point (unlike a border crossing failure). So perhaps this can never fail |
681 | // once we reach here... | 681 | // once we reach here... |
@@ -727,28 +727,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
727 | KiPrimitive(avatar.LocalId); | 727 | KiPrimitive(avatar.LocalId); |
728 | } | 728 | } |
729 | 729 | ||
730 | avatar.Close(); | ||
730 | 731 | ||
731 | uint newRegionX = (uint)(reg.RegionHandle >> 40); | 732 | uint newRegionX = (uint)(reg.RegionHandle >> 40); |
732 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); | 733 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); |
733 | uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); | 734 | uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); |
734 | uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); | 735 | uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); |
735 | 736 | ||
736 | // Let's close some children agents | 737 | if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) |
737 | avatar.CloseChildAgents(newRegionX, newRegionY); | ||
738 | |||
739 | avatar.Close(); | ||
740 | |||
741 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | ||
742 | |||
743 | // This is a little too fast of a distance computation... it's not consistent with the rule | ||
744 | // of having child agents in exactly the adjacent regions. Some topologies result in orphan | ||
745 | // children | ||
746 | //if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) | ||
747 | //if (((int)Math.Abs((int)(newRegionX - oldRegionX)) > 1) || ((int)Math.Abs((int)(newRegionY - oldRegionY)) > 1)) | ||
748 | if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) | ||
749 | { | 738 | { |
750 | //SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); | 739 | //SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); |
751 | //SendCloseChildAgentConnections(avatar.UUID, childRegions); | 740 | SendCloseChildAgentConnections(avatar.UUID, childRegions); |
752 | CloseConnection(avatar.UUID); | 741 | CloseConnection(avatar.UUID); |
753 | } | 742 | } |
754 | 743 | ||
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 | |||
2385 | 2385 | ||
2386 | CrossAttachmentsIntoNewRegion(neighbourHandle, true); | 2386 | CrossAttachmentsIntoNewRegion(neighbourHandle, true); |
2387 | 2387 | ||
2388 | // Next, let's close the child agent connections that are too far away. | ||
2389 | CloseChildAgents(neighbourx, neighboury); | ||
2390 | |||
2391 | // m_scene.SendKillObject(m_localId); | 2388 | // m_scene.SendKillObject(m_localId); |
2392 | 2389 | ||
2393 | m_scene.NotifyMyCoarseLocationChange(); | 2390 | m_scene.NotifyMyCoarseLocationChange(); |