Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

0.7.4.1
Justin Clark-Casey (justincc) 2012-05-17 23:56:36 +01:00
commit 521ad080f1
2 changed files with 30 additions and 31 deletions

View File

@ -3948,35 +3948,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
@ -4028,7 +3999,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;
}
}
}

View File

@ -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]