diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f03c345..984058c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5067,6 +5067,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
5067 | } | 5067 | } |
5068 | } | 5068 | } |
5069 | 5069 | ||
5070 | if (position == Vector3.Zero) // Teleport | ||
5071 | { | ||
5072 | if (!RegionInfo.EstateSettings.AllowDirectTeleport) | ||
5073 | { | ||
5074 | SceneObjectGroup telehub; | ||
5075 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject)) != null) | ||
5076 | { | ||
5077 | List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); | ||
5078 | bool banned = true; | ||
5079 | foreach (SpawnPoint sp in spawnPoints) | ||
5080 | { | ||
5081 | Vector3 spawnPoint = sp.GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
5082 | ILandObject land = LandChannel.GetLandObject(spawnPoint.X, spawnPoint.Y); | ||
5083 | if (land == null) | ||
5084 | continue; | ||
5085 | if (land.IsEitherBannedOrRestricted(agentID)) | ||
5086 | continue; | ||
5087 | banned = false; | ||
5088 | break; | ||
5089 | } | ||
5090 | |||
5091 | if (banned) | ||
5092 | { | ||
5093 | reason = "No suitable landing point found"; | ||
5094 | return false; | ||
5095 | } | ||
5096 | } | ||
5097 | } | ||
5098 | } | ||
5099 | |||
5070 | reason = String.Empty; | 5100 | reason = String.Empty; |
5071 | return true; | 5101 | return true; |
5072 | } | 5102 | } |