diff options
author | Brian McBee | 2008-01-20 21:11:55 +0000 |
---|---|---|
committer | Brian McBee | 2008-01-20 21:11:55 +0000 |
commit | 59d7165f40d01b0df5d28a2654da844a9abcd2db (patch) | |
tree | 558cb8af489512b18280559e8ab9fc9bcdfd4863 /OpenSim/Region/Environment | |
parent | Check if remote simulator is up before attempting teleport. Teleport to a rem... (diff) | |
download | opensim-SC-59d7165f40d01b0df5d28a2654da844a9abcd2db.zip opensim-SC-59d7165f40d01b0df5d28a2654da844a9abcd2db.tar.gz opensim-SC-59d7165f40d01b0df5d28a2654da844a9abcd2db.tar.bz2 opensim-SC-59d7165f40d01b0df5d28a2654da844a9abcd2db.tar.xz |
Graceful failure of teleport to unavailable regions might actually work now.
I blame all bugs on the age of my brain cells.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 16 |
1 files changed, 14 insertions, 2 deletions
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 | |||
403 | public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, LLVector3 position, | 403 | public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, LLVector3 position, |
404 | LLVector3 lookAt, uint flags) | 404 | LLVector3 lookAt, uint flags) |
405 | { | 405 | { |
406 | bool destRegionUp = false; | ||
406 | if (regionHandle == m_regionInfo.RegionHandle) | 407 | if (regionHandle == m_regionInfo.RegionHandle) |
407 | { | 408 | { |
408 | avatar.ControllingClient.SendTeleportLocationStart(); | 409 | avatar.ControllingClient.SendTeleportLocationStart(); |
@@ -421,10 +422,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
421 | agent.startpos = position; | 422 | agent.startpos = position; |
422 | agent.child = true; | 423 | agent.child = true; |
423 | 424 | ||
424 | 425 | if (reg.RemotingAddress != "" && reg.RemotingPort != 0) | |
425 | if(m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent)) | 426 | { |
427 | // region is remote. see if it is up | ||
428 | m_commsProvider.InterRegion.CheckRegion(reg.RemotingAddress, reg.RemotingPort); | ||
429 | destRegionUp = m_commsProvider.InterRegion.Available; | ||
430 | } | ||
431 | else | ||
432 | { | ||
433 | // assume local regions are always up | ||
434 | destRegionUp = true; | ||
435 | } | ||
436 | if(destRegionUp) | ||
426 | { | 437 | { |
427 | avatar.Close(); | 438 | avatar.Close(); |
439 | m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent); | ||
428 | m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, | 440 | m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, |
429 | position, false); | 441 | position, false); |
430 | AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); | 442 | AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); |