From 59d7165f40d01b0df5d28a2654da844a9abcd2db Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Sun, 20 Jan 2008 21:11:55 +0000 Subject: Graceful failure of teleport to unavailable regions might actually work now. I blame all bugs on the age of my brain cells. --- .../Environment/Scenes/SceneCommunicationService.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 640cb3b..666edb1 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -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(); -- cgit v1.1