From 6f3dcf58b8f47922b68993cfdd9cdbd5b4ae36d8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Feb 2013 20:00:39 +0000 Subject: Fix code to check for no spawn points. Possibly a merge artefact? --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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 { case "random": + if (spawnPoints.Length == 0) + return; do { index = Util.RandomClass.Next(spawnPoints.Length - 1); @@ -4057,8 +4059,8 @@ namespace OpenSim.Region.Framework.Scenes // SpawnPoint sp = spawnPoints[index]; ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); - if (spawnPoints.Length == 0) - return; if (land == null || land.IsEitherBannedOrRestricted(UUID)) + + if (land == null || land.IsEitherBannedOrRestricted(UUID)) selected = false; else selected = true; -- cgit v1.1