mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user