diff options
author | Diva Canto | 2010-06-13 19:06:22 -0700 |
---|---|---|
committer | Diva Canto | 2010-06-13 19:06:22 -0700 |
commit | 19558f380a1e9cbaff849eb15262266ea79b60d2 (patch) | |
tree | 1209b45e0beb2100d65b539db5a6ba3448ff7abb /OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |
parent | Fox my changes to radmin (diff) | |
download | opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.zip opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.tar.gz opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.tar.bz2 opensim-SC_OLD-19558f380a1e9cbaff849eb15262266ea79b60d2.tar.xz |
Fixes the long-standing RegionUp bug! Plus lots of other cleanups related to neighbours.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 5d50a83..ab1cfc3 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -922,12 +922,40 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
922 | /// </summary> | 922 | /// </summary> |
923 | public void EnableChildAgent(ScenePresence sp, GridRegion region) | 923 | public void EnableChildAgent(ScenePresence sp, GridRegion region) |
924 | { | 924 | { |
925 | m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighour {0}", region.RegionName); | ||
926 | |||
927 | AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); | ||
925 | AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); | 928 | AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); |
926 | agent.BaseFolder = UUID.Zero; | 929 | agent.BaseFolder = UUID.Zero; |
927 | agent.InventoryFolder = UUID.Zero; | 930 | agent.InventoryFolder = UUID.Zero; |
928 | agent.startpos = new Vector3(128, 128, 70); | 931 | agent.startpos = new Vector3(128, 128, 70); |
929 | agent.child = true; | 932 | agent.child = true; |
930 | agent.Appearance = sp.Appearance; | 933 | agent.Appearance = sp.Appearance; |
934 | agent.CapsPath = CapsUtil.GetRandomCapsObjectPath(); | ||
935 | |||
936 | agent.ChildrenCapSeeds = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID)); | ||
937 | m_log.DebugFormat("[XXX] Seeds 1 {0}", agent.ChildrenCapSeeds.Count); | ||
938 | |||
939 | if (!agent.ChildrenCapSeeds.ContainsKey(sp.Scene.RegionInfo.RegionHandle)) | ||
940 | agent.ChildrenCapSeeds.Add(sp.Scene.RegionInfo.RegionHandle, sp.ControllingClient.RequestClientInfo().CapsPath); | ||
941 | m_log.DebugFormat("[XXX] Seeds 2 {0}", agent.ChildrenCapSeeds.Count); | ||
942 | |||
943 | sp.AddNeighbourRegion(region.RegionHandle, agent.CapsPath); | ||
944 | foreach (ulong h in agent.ChildrenCapSeeds.Keys) | ||
945 | m_log.DebugFormat("[XXX] --> {0}", h); | ||
946 | m_log.DebugFormat("[XXX] Adding {0}", region.RegionHandle); | ||
947 | agent.ChildrenCapSeeds.Add(region.RegionHandle, agent.CapsPath); | ||
948 | |||
949 | if (sp.Scene.CapsModule != null) | ||
950 | { | ||
951 | sp.Scene.CapsModule.SetChildrenSeed(sp.UUID, agent.ChildrenCapSeeds); | ||
952 | } | ||
953 | |||
954 | if (currentAgentCircuit != null) | ||
955 | { | ||
956 | agent.ServiceURLs = currentAgentCircuit.ServiceURLs; | ||
957 | agent.Viewer = currentAgentCircuit.Viewer; | ||
958 | } | ||
931 | 959 | ||
932 | InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; | 960 | InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; |
933 | d.BeginInvoke(sp, agent, region, region.ExternalEndPoint, true, | 961 | d.BeginInvoke(sp, agent, region, region.ExternalEndPoint, true, |