aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs31
1 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5440e6c..7445f57 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -954,17 +954,17 @@ namespace OpenSim.Region.Framework.Scenes
954 // If we come in via login, landmark or map, we want to 954 // If we come in via login, landmark or map, we want to
955 // honor landing points. If we come in via Lure, we want 955 // honor landing points. If we come in via Lure, we want
956 // to ignore them. 956 // to ignore them.
957 if ((m_teleportFlags & (TeleportFlags.ViaLogin | 957 if ((m_teleportFlags & (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID)) == (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID) ||
958 TeleportFlags.ViaLandmark | 958 (m_teleportFlags & TeleportFlags.ViaLandmark) != 0 ||
959 TeleportFlags.ViaLocation)) != 0) 959 (m_teleportFlags & TeleportFlags.ViaLocation) != 0)
960 { 960 {
961 // Don't restrict gods, estate managers, or land owners to 961 // Don't restrict gods, estate managers, or land owners to
962 // the TP point. This behaviour mimics agni. 962 // the TP point. This behaviour mimics agni.
963 if (land.LandData.LandingType == (byte)LandingType.LandingPoint && 963 if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
964 land.LandData.UserLocation != Vector3.Zero && 964 land.LandData.UserLocation != Vector3.Zero &&
965 land.LandData.OwnerID != m_uuid && 965 ((land.LandData.OwnerID != m_uuid &&
966 (!m_scene.Permissions.IsGod(m_uuid)) && 966 (!m_scene.Permissions.IsGod(m_uuid)) &&
967 (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid))) 967 (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid))) || (m_teleportFlags & TeleportFlags.ViaLocation) != 0))
968 { 968 {
969 pos = land.LandData.UserLocation; 969 pos = land.LandData.UserLocation;
970 } 970 }
@@ -1158,6 +1158,7 @@ namespace OpenSim.Region.Framework.Scenes
1158 1158
1159 RemoveFromPhysicalScene(); 1159 RemoveFromPhysicalScene();
1160 Velocity = Vector3.Zero; 1160 Velocity = Vector3.Zero;
1161 CheckLandingPoint(ref pos);
1161 AbsolutePosition = pos; 1162 AbsolutePosition = pos;
1162 AddToPhysicalScene(isFlying); 1163 AddToPhysicalScene(isFlying);
1163 if (m_appearance != null) 1164 if (m_appearance != null)
@@ -1177,6 +1178,7 @@ namespace OpenSim.Region.Framework.Scenes
1177 isFlying = m_physicsActor.Flying; 1178 isFlying = m_physicsActor.Flying;
1178 1179
1179 RemoveFromPhysicalScene(); 1180 RemoveFromPhysicalScene();
1181 CheckLandingPoint(ref pos);
1180 AbsolutePosition = pos; 1182 AbsolutePosition = pos;
1181 AddToPhysicalScene(isFlying); 1183 AddToPhysicalScene(isFlying);
1182 if (m_appearance != null) 1184 if (m_appearance != null)
@@ -2099,6 +2101,7 @@ namespace OpenSim.Region.Framework.Scenes
2099 // { // Single, or Root prim of linkset, target is ClickOffset * RootRot 2101 // { // Single, or Root prim of linkset, target is ClickOffset * RootRot
2100 //offsetr = offset * partIRot; 2102 //offsetr = offset * partIRot;
2101// 2103//
2104 // }
2102 // else 2105 // else
2103 // { // Child prim, offset is (ChildOffset * RootRot) + (ClickOffset * ChildRot) 2106 // { // Child prim, offset is (ChildOffset * RootRot) + (ClickOffset * ChildRot)
2104 // offsetr = //(part.OffsetPosition * Quaternion.Inverse(part.ParentGroup.RootPart.RotationOffset)) + 2107 // offsetr = //(part.OffsetPosition * Quaternion.Inverse(part.ParentGroup.RootPart.RotationOffset)) +
@@ -4415,5 +4418,23 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju
4415 } 4418 }
4416 } 4419 }
4417 } 4420 }
4421
4422 private void CheckLandingPoint(ref Vector3 pos)
4423 {
4424 // Never constrain lures
4425 if ((TeleportFlags & TeleportFlags.ViaLure) != 0)
4426 return;
4427
4428 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
4429
4430 if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
4431 land.LandData.UserLocation != Vector3.Zero &&
4432 land.LandData.OwnerID != m_uuid &&
4433 (!m_scene.Permissions.IsGod(m_uuid)) &&
4434 (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid)))
4435 {
4436 pos = land.LandData.UserLocation;
4437 }
4438 }
4418 } 4439 }
4419} 4440}