Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
521ad080f1
|
@ -3948,35 +3948,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
switch (m_scene.SpawnPointRouting)
|
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":
|
case "random":
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -4028,7 +3999,35 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
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;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,12 +241,12 @@
|
||||||
;; server to send mail through.
|
;; server to send mail through.
|
||||||
; emailmodule = DefaultEmailModule
|
; 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.
|
;; SpawnPointRouting adjusts the landing for incoming avatars.
|
||||||
;; "closest" will place the avatar at the SpawnPoint located in the closest
|
;; "closest" will place the avatar at the SpawnPoint located in the closest
|
||||||
;; available spot to the destination (typically map click/landmark).
|
;; available spot to the destination (typically map click/landmark).
|
||||||
;; "random" will place the avatar on a randomly selected spawnpoint;
|
;; "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
|
; SpawnPointRouting = closest
|
||||||
|
|
||||||
[Estates]
|
[Estates]
|
||||||
|
|
Loading…
Reference in New Issue