Fix teleport routing

Route non-owner avatars according to land settings
iar_mods
BlueWall 2012-01-08 17:41:47 -05:00
parent 58cb7cd084
commit 266167f5a3
1 changed files with 17 additions and 0 deletions

View File

@ -1180,6 +1180,23 @@ namespace OpenSim.Region.Framework.Scenes
client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); client.Name, Scene.RegionInfo.RegionName, AbsolutePosition);
Vector3 look = Velocity; Vector3 look = Velocity;
// Place avatar according to parcel owner teleport routing...
ILandObject land = Scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y);
if (land != null)
{
// Land owner should be able to land anywhere, others honor settings
if (land.LandData.OwnerID != client.AgentId)
{
if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
{
AbsolutePosition = land.LandData.UserLocation;
look = land.LandData.UserLookAt;
}
}
}
if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
{ {
look = new Vector3(0.99f, 0.042f, 0); look = new Vector3(0.99f, 0.042f, 0);