aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2013-02-10 20:01:51 +0000
committerMelanie2013-02-10 20:01:51 +0000
commit12f732fd3f1883dc016fc801bfd834290aa1cd06 (patch)
tree8d1a23a04f8c206b5bf0a79ce510c62ee7dc23ed /OpenSim/Region/Framework
parentMerge branch 'master' into careminster (diff)
parentFix code to check for no spawn points. Possibly a merge artefact? (diff)
downloadopensim-SC_OLD-12f732fd3f1883dc016fc801bfd834290aa1cd06.zip
opensim-SC_OLD-12f732fd3f1883dc016fc801bfd834290aa1cd06.tar.gz
opensim-SC_OLD-12f732fd3f1883dc016fc801bfd834290aa1cd06.tar.bz2
opensim-SC_OLD-12f732fd3f1883dc016fc801bfd834290aa1cd06.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs11
2 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index c757147..1a1c3d2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5865,8 +5865,13 @@ Environment.Exit(1);
5865 5865
5866 if (banned) 5866 if (banned)
5867 { 5867 {
5868 reason = "No suitable landing point found"; 5868 if(Permissions.IsAdministrator(agentID) == false || Permissions.IsGridGod(agentID) == false)
5869 return false; 5869 {
5870 reason = "No suitable landing point found";
5871 return false;
5872 }
5873 reason = "Administrative access only";
5874 return true;
5870 } 5875 }
5871 } 5876 }
5872 } 5877 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0bcf480..a57e0d1 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -4269,6 +4269,7 @@ namespace OpenSim.Region.Framework.Scenes
4269 (m_teleportFlags & TeleportFlags.ViaLocation) != 0 || 4269 (m_teleportFlags & TeleportFlags.ViaLocation) != 0 ||
4270 (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0) 4270 (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0)
4271 { 4271 {
4272
4272 if (GodLevel < 200 && 4273 if (GodLevel < 200 &&
4273 ((!m_scene.Permissions.IsGod(m_uuid) && 4274 ((!m_scene.Permissions.IsGod(m_uuid) &&
4274 !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || 4275 !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) ||
@@ -4277,7 +4278,14 @@ namespace OpenSim.Region.Framework.Scenes
4277 { 4278 {
4278 SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray(); 4279 SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray();
4279 if (spawnPoints.Length == 0) 4280 if (spawnPoints.Length == 0)
4281 {
4282 if(m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid))
4283 {
4284 pos.X = 128.0f;
4285 pos.Y = 128.0f;
4286 }
4280 return; 4287 return;
4288 }
4281 4289
4282 int index; 4290 int index;
4283 bool selected = false; 4291 bool selected = false;
@@ -4286,6 +4294,8 @@ namespace OpenSim.Region.Framework.Scenes
4286 { 4294 {
4287 case "random": 4295 case "random":
4288 4296
4297 if (spawnPoints.Length == 0)
4298 return;
4289 do 4299 do
4290 { 4300 {
4291 index = Util.RandomClass.Next(spawnPoints.Length - 1); 4301 index = Util.RandomClass.Next(spawnPoints.Length - 1);
@@ -4297,6 +4307,7 @@ namespace OpenSim.Region.Framework.Scenes
4297 // SpawnPoint sp = spawnPoints[index]; 4307 // SpawnPoint sp = spawnPoints[index];
4298 4308
4299 ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); 4309 ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y);
4310
4300 if (land == null || land.IsEitherBannedOrRestricted(UUID)) 4311 if (land == null || land.IsEitherBannedOrRestricted(UUID))
4301 selected = false; 4312 selected = false;
4302 else 4313 else