And finally... region crossings entirely over RESTComms/LocalComms. No more remoting for agent movements. WARNING: This breaks region crossing compatibility with previous versions.
parent
163c1026d1
commit
96113e5660
|
@ -1085,11 +1085,21 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
agent.Name, agent.UUID, agent.Scene.RegionInfo.RegionName);
|
||||
}
|
||||
|
||||
bool crossingSuccessful =
|
||||
CrossToNeighbouringRegion(neighbourHandle, agent.ControllingClient.AgentId, pos,
|
||||
isFlying);
|
||||
if (crossingSuccessful)
|
||||
{
|
||||
//bool crossingSuccessful =
|
||||
// CrossToNeighbouringRegion(neighbourHandle, agent.ControllingClient.AgentId, pos,
|
||||
//isFlying);
|
||||
|
||||
SetInTransit(agent.UUID);
|
||||
AgentData cAgent = new AgentData();
|
||||
agent.CopyTo(cAgent);
|
||||
cAgent.Position = pos;
|
||||
if (isFlying)
|
||||
cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
|
||||
cAgent.CallbackURI = "http://" + m_regionInfo.ExternalHostName + ":" + m_regionInfo.HttpPort +
|
||||
"/agent/" + agent.UUID.ToString() + "/" + agent.Scene.RegionInfo.RegionHandle.ToString() + "/release/";
|
||||
|
||||
m_interregionCommsOut.SendChildAgentUpdate(neighbourHandle, cAgent);
|
||||
|
||||
// Next, let's close the child agent connections that are too far away.
|
||||
agent.CloseChildAgents(neighbourx, neighboury);
|
||||
|
||||
|
@ -1125,6 +1135,16 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
capsPath);
|
||||
}
|
||||
|
||||
if (!WaitForCallback(agent.UUID))
|
||||
{
|
||||
ResetFromTransit(agent.UUID);
|
||||
|
||||
// Yikes! We should just have a ref to scene here.
|
||||
agent.Scene.InformClientOfNeighbours(agent);
|
||||
|
||||
return agent;
|
||||
}
|
||||
|
||||
agent.MakeChildAgent();
|
||||
// now we have a child agent in this region. Request all interesting data about other (root) agents
|
||||
agent.SendInitialFullUpdateToAllClients();
|
||||
|
@ -1143,14 +1163,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
"[SCENE COMM]: User {0} is going to another region, profile cache removed", agent.UUID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//// Restore the user structures that we needed to delete before asking the receiving region
|
||||
//// to complete the crossing
|
||||
//userInfo.FetchInventory();
|
||||
//agent.Scene.CapsModule.AddCapsHandler(agent.UUID);
|
||||
}
|
||||
}
|
||||
|
||||
//Console.WriteLine("AFTER CROSS");
|
||||
//Scene.DumpChildrenSeeds(UUID);
|
||||
|
|
Loading…
Reference in New Issue