Merge branch 'master' of /home/opensim/var/repo/opensim
commit
c1467e7fe1
|
@ -1106,16 +1106,21 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion,
|
ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion,
|
||||||
bool isFlying, string version)
|
bool isFlying, string version)
|
||||||
{
|
{
|
||||||
|
if (neighbourRegion == null)
|
||||||
|
return agent;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
SetInTransit(agent.UUID);
|
||||||
|
|
||||||
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
|
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
|
||||||
|
|
||||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} to {2}-{3} running version {4}", agent.Firstname, agent.Lastname, neighbourx, neighboury, version);
|
m_log.DebugFormat(
|
||||||
|
"[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} to {2}-{3} running version {4}",
|
||||||
|
agent.Firstname, agent.Lastname, neighbourx, neighboury, version);
|
||||||
|
|
||||||
Scene m_scene = agent.Scene;
|
Scene m_scene = agent.Scene;
|
||||||
|
|
||||||
if (neighbourRegion != null)
|
|
||||||
{
|
|
||||||
if (!agent.ValidateAttachments())
|
if (!agent.ValidateAttachments())
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.",
|
"[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.",
|
||||||
|
@ -1126,8 +1131,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
agent.RemoveFromPhysicalScene();
|
agent.RemoveFromPhysicalScene();
|
||||||
|
|
||||||
SetInTransit(agent.UUID);
|
|
||||||
|
|
||||||
AgentData cAgent = new AgentData();
|
AgentData cAgent = new AgentData();
|
||||||
agent.CopyTo(cAgent);
|
agent.CopyTo(cAgent);
|
||||||
cAgent.Position = pos;
|
cAgent.Position = pos;
|
||||||
|
@ -1143,9 +1146,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
|
if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
|
||||||
{
|
{
|
||||||
// region doesn't take it
|
// region doesn't take it
|
||||||
|
UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
ReInstantiateScripts(agent);
|
ReInstantiateScripts(agent);
|
||||||
agent.AddToPhysicalScene(isFlying);
|
agent.AddToPhysicalScene(isFlying);
|
||||||
ResetFromTransit(agent.UUID);
|
ResetFromTransit(agent.UUID);
|
||||||
|
|
||||||
return agent;
|
return agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1205,7 +1211,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true);
|
CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Next, let's close the child agent connections that are too far away.
|
// Next, let's close the child agent connections that are too far away.
|
||||||
agent.CloseChildAgents(neighbourx, neighboury);
|
agent.CloseChildAgents(neighbourx, neighboury);
|
||||||
|
|
||||||
|
@ -1219,7 +1224,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID);
|
"[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//m_log.Debug("AFTER CROSS");
|
//m_log.Debug("AFTER CROSS");
|
||||||
//Scene.DumpChildrenSeeds(UUID);
|
//Scene.DumpChildrenSeeds(UUID);
|
||||||
|
@ -1230,6 +1234,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2}. Exception {3}{4}",
|
"[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2}. Exception {3}{4}",
|
||||||
agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName, e.Message, e.StackTrace);
|
agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName, e.Message, e.StackTrace);
|
||||||
|
|
||||||
|
// TODO: Might be worth attempting other restoration here such as reinstantiation of scripts, etc.
|
||||||
}
|
}
|
||||||
|
|
||||||
return agent;
|
return agent;
|
||||||
|
|
Loading…
Reference in New Issue