diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 9899ccd..18bd5e5 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1049,7 +1049,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1049 | 1049 | ||
1050 | sp.HasMovedAway(!(OutSideViewRange || logout)); | 1050 | sp.HasMovedAway(!(OutSideViewRange || logout)); |
1051 | 1051 | ||
1052 | ulong sourceRegionHandle = sp.RegionHandle; | 1052 | // ulong sourceRegionHandle = sp.RegionHandle; |
1053 | 1053 | ||
1054 | // Now let's make it officially a child agent | 1054 | // Now let's make it officially a child agent |
1055 | sp.MakeChildAgent(destinationHandle); | 1055 | sp.MakeChildAgent(destinationHandle); |
@@ -1196,7 +1196,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1196 | //HG hook | 1196 | //HG hook |
1197 | AgentHasMovedAway(sp, logout); | 1197 | AgentHasMovedAway(sp, logout); |
1198 | 1198 | ||
1199 | ulong sourceRegionHandle = sp.RegionHandle; | 1199 | // ulong sourceRegionHandle = sp.RegionHandle; |
1200 | 1200 | ||
1201 | // Now let's make it officially a child agent | 1201 | // Now let's make it officially a child agent |
1202 | sp.MakeChildAgent(destinationHandle); | 1202 | sp.MakeChildAgent(destinationHandle); |
@@ -1804,8 +1804,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1804 | // Unlike a teleport, here we do not wait for the destination region to confirm the receipt. | 1804 | // Unlike a teleport, here we do not wait for the destination region to confirm the receipt. |
1805 | m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); | 1805 | m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); |
1806 | 1806 | ||
1807 | |||
1808 | |||
1809 | agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); | 1807 | agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); |
1810 | 1808 | ||
1811 | // this may need the attachments | 1809 | // this may need the attachments |
@@ -1817,6 +1815,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1817 | // FIXME: Possibly this should occur lower down after other commands to close other agents, | 1815 | // FIXME: Possibly this should occur lower down after other commands to close other agents, |
1818 | // but not sure yet what the side effects would be. | 1816 | // but not sure yet what the side effects would be. |
1819 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); | 1817 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); |
1818 | |||
1819 | |||
1820 | // TODO: Check since what version this wasn't needed anymore. May be as old as 0.6 | 1820 | // TODO: Check since what version this wasn't needed anymore. May be as old as 0.6 |
1821 | /* | 1821 | /* |
1822 | // Backwards compatibility. Best effort | 1822 | // Backwards compatibility. Best effort |
@@ -1959,7 +1959,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1959 | UUID scope = sp.Scene.RegionInfo.ScopeID; | 1959 | UUID scope = sp.Scene.RegionInfo.ScopeID; |
1960 | foreach (ulong handler in oldregions) | 1960 | foreach (ulong handler in oldregions) |
1961 | { | 1961 | { |
1962 | // crap code | ||
1963 | Utils.LongToUInts(handler, out neighbourx, out neighboury); | 1962 | Utils.LongToUInts(handler, out neighbourx, out neighboury); |
1964 | GridRegion neighbour = sp.Scene.GridService.GetRegionByPosition(scope, (int)neighbourx, (int)neighboury); | 1963 | GridRegion neighbour = sp.Scene.GridService.GetRegionByPosition(scope, (int)neighbourx, (int)neighboury); |
1965 | sp.Scene.SimulationService.UpdateAgent(neighbour, agentpos); | 1964 | sp.Scene.SimulationService.UpdateAgent(neighbour, agentpos); |
@@ -2398,10 +2397,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2398 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint); | 2397 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint); |
2399 | } | 2398 | } |
2400 | 2399 | ||
2401 | if (!regionAccepted) | 2400 | else |
2401 | { | ||
2402 | sp.RemoveNeighbourRegion(reg.RegionHandle); | ||
2402 | m_log.WarnFormat( | 2403 | m_log.WarnFormat( |
2403 | "[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}", | 2404 | "[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}", |
2404 | reg.RegionName, sp.Name, sp.UUID, reason); | 2405 | reg.RegionName, sp.Name, sp.UUID, reason); |
2406 | } | ||
2405 | } | 2407 | } |
2406 | 2408 | ||
2407 | } | 2409 | } |