Graceful failure of teleport to unavailable regions might actually work now.

I blame all bugs on the age of my brain cells.
This commit is contained in:
Brian McBee
2008-01-20 21:11:55 +00:00
parent 730e2d6d7c
commit 59d7165f40
4 changed files with 34 additions and 10 deletions

View File

@@ -403,6 +403,7 @@ namespace OpenSim.Region.Environment.Scenes
public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, LLVector3 position,
LLVector3 lookAt, uint flags)
{
bool destRegionUp = false;
if (regionHandle == m_regionInfo.RegionHandle)
{
avatar.ControllingClient.SendTeleportLocationStart();
@@ -421,10 +422,21 @@ namespace OpenSim.Region.Environment.Scenes
agent.startpos = position;
agent.child = true;
if(m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent))
if (reg.RemotingAddress != "" && reg.RemotingPort != 0)
{
// region is remote. see if it is up
m_commsProvider.InterRegion.CheckRegion(reg.RemotingAddress, reg.RemotingPort);
destRegionUp = m_commsProvider.InterRegion.Available;
}
else
{
// assume local regions are always up
destRegionUp = true;
}
if(destRegionUp)
{
avatar.Close();
m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId,
position, false);
AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo();