From 266167f5a390e089f7f79d73bdaad4c853d04daa Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 8 Jan 2012 17:41:47 -0500 Subject: [PATCH] Fix teleport routing Route non-owner avatars according to land settings --- .../Region/Framework/Scenes/ScenePresence.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8ebb7a6bdc..afd4813113 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1180,6 +1180,23 @@ namespace OpenSim.Region.Framework.Scenes client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); 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)) { look = new Vector3(0.99f, 0.042f, 0);