And finally... region crossings entirely over RESTComms/LocalComms. No more remoting for agent movements. WARNING: This breaks region crossing compatibility with previous versions.

0.6.3-post-fixes
diva 2009-02-13 03:45:08 +00:00
parent 163c1026d1
commit 96113e5660
1 changed files with 70 additions and 58 deletions

View File

@ -1085,11 +1085,21 @@ namespace OpenSim.Region.Framework.Scenes
agent.Name, agent.UUID, agent.Scene.RegionInfo.RegionName); agent.Name, agent.UUID, agent.Scene.RegionInfo.RegionName);
} }
bool crossingSuccessful = //bool crossingSuccessful =
CrossToNeighbouringRegion(neighbourHandle, agent.ControllingClient.AgentId, pos, // CrossToNeighbouringRegion(neighbourHandle, agent.ControllingClient.AgentId, pos,
isFlying); //isFlying);
if (crossingSuccessful)
{ 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. // Next, let's close the child agent connections that are too far away.
agent.CloseChildAgents(neighbourx, neighboury); agent.CloseChildAgents(neighbourx, neighboury);
@ -1125,6 +1135,16 @@ namespace OpenSim.Region.Framework.Scenes
capsPath); 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(); agent.MakeChildAgent();
// now we have a child agent in this region. Request all interesting data about other (root) agents // now we have a child agent in this region. Request all interesting data about other (root) agents
agent.SendInitialFullUpdateToAllClients(); 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); "[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"); //Console.WriteLine("AFTER CROSS");
//Scene.DumpChildrenSeeds(UUID); //Scene.DumpChildrenSeeds(UUID);