Support rejecting a teleport if a user is banned in all parcels that have
spawn pointsavinationmerge
parent
a6abecf5fa
commit
da720ce9be
|
@ -5067,6 +5067,36 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (position == Vector3.Zero) // Teleport
|
||||||
|
{
|
||||||
|
if (!RegionInfo.EstateSettings.AllowDirectTeleport)
|
||||||
|
{
|
||||||
|
SceneObjectGroup telehub;
|
||||||
|
if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject)) != null)
|
||||||
|
{
|
||||||
|
List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints();
|
||||||
|
bool banned = true;
|
||||||
|
foreach (SpawnPoint sp in spawnPoints)
|
||||||
|
{
|
||||||
|
Vector3 spawnPoint = sp.GetLocation(telehub.AbsolutePosition, telehub.GroupRotation);
|
||||||
|
ILandObject land = LandChannel.GetLandObject(spawnPoint.X, spawnPoint.Y);
|
||||||
|
if (land == null)
|
||||||
|
continue;
|
||||||
|
if (land.IsEitherBannedOrRestricted(agentID))
|
||||||
|
continue;
|
||||||
|
banned = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (banned)
|
||||||
|
{
|
||||||
|
reason = "No suitable landing point found";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reason = String.Empty;
|
reason = String.Empty;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue