From 0aa7baf49a9defdd7d7355198b95abe57639bc26 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 16 May 2012 23:17:42 -0400 Subject: Fix boo-boo in OpenSim.ini.example affecting telehub sequential routing Configuration value should be "sequence" instead of "sequential" --- bin/OpenSim.ini.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 9b88816..9f418a4 100755 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -241,12 +241,12 @@ ;; server to send mail through. ; emailmodule = DefaultEmailModule - ;# {SpawnPointRouting} {} {Set routing method for Telehub Spawnpoints} {closest random sequential} closest + ;# {SpawnPointRouting} {} {Set routing method for Telehub Spawnpoints} {closest random sequence} closest ;; SpawnPointRouting adjusts the landing for incoming avatars. ;; "closest" will place the avatar at the SpawnPoint located in the closest ;; available spot to the destination (typically map click/landmark). ;; "random" will place the avatar on a randomly selected spawnpoint; - ;; "sequential" will place the avatar on the next sequential SpawnPoint + ;; "sequence" will place the avatar on the next sequential SpawnPoint ; SpawnPointRouting = closest [Estates] -- cgit v1.1 From 295bb3227d0c7d108d73ef7be4fd1dd59f7afc21 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Thu, 17 May 2012 00:47:19 -0400 Subject: Force the default Telehub router if no matches are found in the config. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 57 ++++++++++++------------ 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index bdcef71..0d5c218 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3939,35 +3939,6 @@ namespace OpenSim.Region.Framework.Scenes switch (m_scene.SpawnPointRouting) { - case "closest": - - float distance = 9999; - int closest = -1; - - for (int i = 0; i < spawnPoints.Length; i++) - { - Vector3 spawnPosition = spawnPoints[i].GetLocation( - telehub.AbsolutePosition, - telehub.GroupRotation - ); - Vector3 offset = spawnPosition - pos; - float d = Vector3.Mag(offset); - if (d >= distance) - continue; - ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); - if (land == null) - continue; - if (land.IsEitherBannedOrRestricted(UUID)) - continue; - distance = d; - closest = i; - } - if (closest == -1) - return; - - pos = spawnPoints[closest].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); - return; - case "random": do @@ -4019,7 +3990,35 @@ namespace OpenSim.Region.Framework.Scenes return; default: + case "closest": + + float distance = 9999; + int closest = -1; + + for (int i = 0; i < spawnPoints.Length; i++) + { + Vector3 spawnPosition = spawnPoints[i].GetLocation( + telehub.AbsolutePosition, + telehub.GroupRotation + ); + Vector3 offset = spawnPosition - pos; + float d = Vector3.Mag(offset); + if (d >= distance) + continue; + ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); + if (land == null) + continue; + if (land.IsEitherBannedOrRestricted(UUID)) + continue; + distance = d; + closest = i; + } + if (closest == -1) + return; + + pos = spawnPoints[closest].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); return; + } } } -- cgit v1.1