diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bbdf35d..7b1ef40 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3397,6 +3397,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3397 | { | 3397 | { |
3398 | bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || | 3398 | bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || |
3399 | (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); | 3399 | (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); |
3400 | bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0); | ||
3401 | bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0); | ||
3402 | |||
3400 | reason = String.Empty; | 3403 | reason = String.Empty; |
3401 | 3404 | ||
3402 | //Teleport flags: | 3405 | //Teleport flags: |
@@ -3571,6 +3574,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3571 | agent.startpos.Z = 720; | 3574 | agent.startpos.Z = 720; |
3572 | } | 3575 | } |
3573 | } | 3576 | } |
3577 | |||
3578 | // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags | ||
3579 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && | ||
3580 | RegionInfo.EstateSettings.AllowDirectTeleport == false && | ||
3581 | !viahome && !godlike) | ||
3582 | { | ||
3583 | SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); | ||
3584 | // Can have multiple SpawnPoints | ||
3585 | List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); | ||
3586 | if ( spawnpoints.Count > 1) | ||
3587 | { | ||
3588 | // We have multiple SpawnPoints, Route the agent to a random one | ||
3589 | agent.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count)].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3590 | } | ||
3591 | else | ||
3592 | { | ||
3593 | // We have a single SpawnPoint and will route the agent to it | ||
3594 | agent.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3595 | } | ||
3596 | |||
3597 | return true; | ||
3598 | } | ||
3599 | |||
3574 | // Honor parcel landing type and position. | 3600 | // Honor parcel landing type and position. |
3575 | /* | 3601 | /* |
3576 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | 3602 | ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); |