remove failed CreateAgent from agent child regions list

LSLKeyTest
UbitUmarov 2015-12-02 04:40:06 +00:00
parent e2796e6044
commit d5e21a0ad2
1 changed files with 8 additions and 6 deletions

View File

@ -1049,7 +1049,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
sp.HasMovedAway(!(OutSideViewRange || logout)); sp.HasMovedAway(!(OutSideViewRange || logout));
ulong sourceRegionHandle = sp.RegionHandle; // ulong sourceRegionHandle = sp.RegionHandle;
// Now let's make it officially a child agent // Now let's make it officially a child agent
sp.MakeChildAgent(destinationHandle); sp.MakeChildAgent(destinationHandle);
@ -1196,7 +1196,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
//HG hook //HG hook
AgentHasMovedAway(sp, logout); AgentHasMovedAway(sp, logout);
ulong sourceRegionHandle = sp.RegionHandle; // ulong sourceRegionHandle = sp.RegionHandle;
// Now let's make it officially a child agent // Now let's make it officially a child agent
sp.MakeChildAgent(destinationHandle); sp.MakeChildAgent(destinationHandle);
@ -1804,8 +1804,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Unlike a teleport, here we do not wait for the destination region to confirm the receipt. // Unlike a teleport, here we do not wait for the destination region to confirm the receipt.
m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
// this may need the attachments // this may need the attachments
@ -1817,6 +1815,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// FIXME: Possibly this should occur lower down after other commands to close other agents, // FIXME: Possibly this should occur lower down after other commands to close other agents,
// but not sure yet what the side effects would be. // but not sure yet what the side effects would be.
m_entityTransferStateMachine.ResetFromTransit(agent.UUID); m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
// TODO: Check since what version this wasn't needed anymore. May be as old as 0.6 // TODO: Check since what version this wasn't needed anymore. May be as old as 0.6
/* /*
// Backwards compatibility. Best effort // Backwards compatibility. Best effort
@ -1959,7 +1959,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
UUID scope = sp.Scene.RegionInfo.ScopeID; UUID scope = sp.Scene.RegionInfo.ScopeID;
foreach (ulong handler in oldregions) foreach (ulong handler in oldregions)
{ {
// crap code
Utils.LongToUInts(handler, out neighbourx, out neighboury); Utils.LongToUInts(handler, out neighbourx, out neighboury);
GridRegion neighbour = sp.Scene.GridService.GetRegionByPosition(scope, (int)neighbourx, (int)neighboury); GridRegion neighbour = sp.Scene.GridService.GetRegionByPosition(scope, (int)neighbourx, (int)neighboury);
sp.Scene.SimulationService.UpdateAgent(neighbour, agentpos); sp.Scene.SimulationService.UpdateAgent(neighbour, agentpos);
@ -2398,10 +2397,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint); m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint);
} }
if (!regionAccepted) else
{
sp.RemoveNeighbourRegion(reg.RegionHandle);
m_log.WarnFormat( m_log.WarnFormat(
"[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}", "[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}",
reg.RegionName, sp.Name, sp.UUID, reason); reg.RegionName, sp.Name, sp.UUID, reason);
}
} }
} }