diff options
author | Justin Clark-Casey (justincc) | 2012-01-27 23:14:34 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-27 23:14:34 +0000 |
commit | abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef (patch) | |
tree | 74506e8e519bdf13305ca595b4a74eed7952c6a4 /OpenSim/Region/Framework/Scenes | |
parent | Implement osNpcGetOwner(key npc):key. This returns the owner for an 'owned' ... (diff) | |
parent | HG Inventoty: Guard against items not found. (diff) | |
download | opensim-SC_OLD-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.zip opensim-SC_OLD-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.tar.gz opensim-SC_OLD-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.tar.bz2 opensim-SC_OLD-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-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 | } |