diff options
author | Justin Clark-Casey (justincc) | 2012-05-17 23:56:36 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-17 23:56:36 +0100 |
commit | 521ad080f1006d59cb20cb2c3bc261abca7e13a7 (patch) | |
tree | e98005f31217cfc1d5bee08a470dfe70c8e90090 | |
parent | Check agent limit against root agent count rather than both root and child ag... (diff) | |
parent | Merge branch 'master' of /home/opensim/lib/osgrid/opensim (diff) | |
download | opensim-SC-521ad080f1006d59cb20cb2c3bc261abca7e13a7.zip opensim-SC-521ad080f1006d59cb20cb2c3bc261abca7e13a7.tar.gz opensim-SC-521ad080f1006d59cb20cb2c3bc261abca7e13a7.tar.bz2 opensim-SC-521ad080f1006d59cb20cb2c3bc261abca7e13a7.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 57 | ||||
-rwxr-xr-x | bin/OpenSim.ini.example | 4 |
2 files changed, 30 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 558fd9c..0c66e49 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3948,35 +3948,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3948 | 3948 | ||
3949 | switch (m_scene.SpawnPointRouting) | 3949 | switch (m_scene.SpawnPointRouting) |
3950 | { | 3950 | { |
3951 | case "closest": | ||
3952 | |||
3953 | float distance = 9999; | ||
3954 | int closest = -1; | ||
3955 | |||
3956 | for (int i = 0; i < spawnPoints.Length; i++) | ||
3957 | { | ||
3958 | Vector3 spawnPosition = spawnPoints[i].GetLocation( | ||
3959 | telehub.AbsolutePosition, | ||
3960 | telehub.GroupRotation | ||
3961 | ); | ||
3962 | Vector3 offset = spawnPosition - pos; | ||
3963 | float d = Vector3.Mag(offset); | ||
3964 | if (d >= distance) | ||
3965 | continue; | ||
3966 | ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); | ||
3967 | if (land == null) | ||
3968 | continue; | ||
3969 | if (land.IsEitherBannedOrRestricted(UUID)) | ||
3970 | continue; | ||
3971 | distance = d; | ||
3972 | closest = i; | ||
3973 | } | ||
3974 | if (closest == -1) | ||
3975 | return; | ||
3976 | |||
3977 | pos = spawnPoints[closest].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3978 | return; | ||
3979 | |||
3980 | case "random": | 3951 | case "random": |
3981 | 3952 | ||
3982 | do | 3953 | do |
@@ -4028,7 +3999,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
4028 | return; | 3999 | return; |
4029 | 4000 | ||
4030 | default: | 4001 | default: |
4002 | case "closest": | ||
4003 | |||
4004 | float distance = 9999; | ||
4005 | int closest = -1; | ||
4006 | |||
4007 | for (int i = 0; i < spawnPoints.Length; i++) | ||
4008 | { | ||
4009 | Vector3 spawnPosition = spawnPoints[i].GetLocation( | ||
4010 | telehub.AbsolutePosition, | ||
4011 | telehub.GroupRotation | ||
4012 | ); | ||
4013 | Vector3 offset = spawnPosition - pos; | ||
4014 | float d = Vector3.Mag(offset); | ||
4015 | if (d >= distance) | ||
4016 | continue; | ||
4017 | ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); | ||
4018 | if (land == null) | ||
4019 | continue; | ||
4020 | if (land.IsEitherBannedOrRestricted(UUID)) | ||
4021 | continue; | ||
4022 | distance = d; | ||
4023 | closest = i; | ||
4024 | } | ||
4025 | if (closest == -1) | ||
4026 | return; | ||
4027 | |||
4028 | pos = spawnPoints[closest].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
4031 | return; | 4029 | return; |
4030 | |||
4032 | } | 4031 | } |
4033 | } | 4032 | } |
4034 | } | 4033 | } |
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 @@ | |||
241 | ;; server to send mail through. | 241 | ;; server to send mail through. |
242 | ; emailmodule = DefaultEmailModule | 242 | ; emailmodule = DefaultEmailModule |
243 | 243 | ||
244 | ;# {SpawnPointRouting} {} {Set routing method for Telehub Spawnpoints} {closest random sequential} closest | 244 | ;# {SpawnPointRouting} {} {Set routing method for Telehub Spawnpoints} {closest random sequence} closest |
245 | ;; SpawnPointRouting adjusts the landing for incoming avatars. | 245 | ;; SpawnPointRouting adjusts the landing for incoming avatars. |
246 | ;; "closest" will place the avatar at the SpawnPoint located in the closest | 246 | ;; "closest" will place the avatar at the SpawnPoint located in the closest |
247 | ;; available spot to the destination (typically map click/landmark). | 247 | ;; available spot to the destination (typically map click/landmark). |
248 | ;; "random" will place the avatar on a randomly selected spawnpoint; | 248 | ;; "random" will place the avatar on a randomly selected spawnpoint; |
249 | ;; "sequential" will place the avatar on the next sequential SpawnPoint | 249 | ;; "sequence" will place the avatar on the next sequential SpawnPoint |
250 | ; SpawnPointRouting = closest | 250 | ; SpawnPointRouting = closest |
251 | 251 | ||
252 | [Estates] | 252 | [Estates] |