diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 30bd715..70e3952 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4046,6 +4046,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4046 | { | 4046 | { |
4047 | case "random": | 4047 | case "random": |
4048 | 4048 | ||
4049 | if (spawnPoints.Length == 0) | ||
4050 | return; | ||
4049 | do | 4051 | do |
4050 | { | 4052 | { |
4051 | index = Util.RandomClass.Next(spawnPoints.Length - 1); | 4053 | index = Util.RandomClass.Next(spawnPoints.Length - 1); |
@@ -4057,8 +4059,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4057 | // SpawnPoint sp = spawnPoints[index]; | 4059 | // SpawnPoint sp = spawnPoints[index]; |
4058 | 4060 | ||
4059 | ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); | 4061 | ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); |
4060 | if (spawnPoints.Length == 0) | 4062 | |
4061 | return; if (land == null || land.IsEitherBannedOrRestricted(UUID)) | 4063 | if (land == null || land.IsEitherBannedOrRestricted(UUID)) |
4062 | selected = false; | 4064 | selected = false; |
4063 | else | 4065 | else |
4064 | selected = true; | 4066 | selected = true; |