aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-27 23:14:34 +0000
committerJustin Clark-Casey (justincc)2012-01-27 23:14:34 +0000
commitabf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef (patch)
tree74506e8e519bdf13305ca595b4a74eed7952c6a4 /OpenSim/Region/Framework
parentImplement osNpcGetOwner(key npc):key. This returns the owner for an 'owned' ... (diff)
parentHG Inventoty: Guard against items not found. (diff)
downloadopensim-SC-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.zip
opensim-SC-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.tar.gz
opensim-SC-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.tar.bz2
opensim-SC-abf0dd4250dcf458c8d0ef71a388a4cf89c4a1ef.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs30
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 }