diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4c8e2d2..ecc553d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3427,6 +3427,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
3427 | agent.startpos.Z = 720; | 3427 | agent.startpos.Z = 720; |
3428 | } | 3428 | } |
3429 | } | 3429 | } |
3430 | |||
3431 | // Honor Estate teleport routing via Telehubs | ||
3432 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false) | ||
3433 | { | ||
3434 | SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); | ||
3435 | // Can have multiple SpawnPoints | ||
3436 | List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); | ||
3437 | if ( spawnpoints.Count > 1) | ||
3438 | { | ||
3439 | // We have multiple SpawnPoints, Route the agent to a random one | ||
3440 | agent.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count)].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3441 | } | ||
3442 | else | ||
3443 | { | ||
3444 | // We have a single SpawnPoint and will route the agent to it | ||
3445 | agent.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3446 | } | ||
3447 | |||
3448 | return true; | ||
3449 | } | ||
3450 | |||
3430 | // Honor parcel landing type and position. | 3451 | // Honor parcel landing type and position. |
3431 | if (land != null) | 3452 | if (land != null) |
3432 | { | 3453 | { |