aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2011-11-05 23:06:59 +0000
committerMelanie2011-11-05 23:06:59 +0000
commit57194facdc4aae3b9498041aad56d4f1942225fc (patch)
treed9e300d1489d9b04b24bff7ed885e2f723492548
parentMerge branch 'master' into bigmerge (diff)
downloadopensim-SC_OLD-57194facdc4aae3b9498041aad56d4f1942225fc.zip
opensim-SC_OLD-57194facdc4aae3b9498041aad56d4f1942225fc.tar.gz
opensim-SC_OLD-57194facdc4aae3b9498041aad56d4f1942225fc.tar.bz2
opensim-SC_OLD-57194facdc4aae3b9498041aad56d4f1942225fc.tar.xz
Fix up with core changes
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs87
2 files changed, 31 insertions, 57 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5d4ddea..42ce61e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -675,7 +675,6 @@ namespace OpenSim.Region.Framework.Scenes
675 675
676 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 676 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
677 677
678 m_log.DebugFormat("[SCENE]: prejump is {0}", m_usePreJump ? "ON" : "OFF");
679 if (RegionInfo.NonphysPrimMax > 0) 678 if (RegionInfo.NonphysPrimMax > 0)
680 { 679 {
681 m_maxNonphys = RegionInfo.NonphysPrimMax; 680 m_maxNonphys = RegionInfo.NonphysPrimMax;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 76bc390..f3af808 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -920,61 +920,7 @@ namespace OpenSim.Region.Framework.Scenes
920 pos.Y = crossedBorder.BorderLine.Z - 1; 920 pos.Y = crossedBorder.BorderLine.Z - 1;
921 } 921 }
922 922
923 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 923 CheckAndAdjustLandingPoint(ref pos);
924 if (land != null)
925 {
926 // If we come in via login, landmark or map, we want to
927 // honor landing points. If we come in via Lure, we want
928 // to ignore them.
929 if ((m_teleportFlags & (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID)) == (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID) ||
930 (m_teleportFlags & TeleportFlags.ViaLandmark) != 0 ||
931 (m_teleportFlags & TeleportFlags.ViaLocation) != 0)
932 {
933 // Don't restrict gods, estate managers, or land owners to
934 // the TP point. This behaviour mimics agni.
935 if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
936 land.LandData.UserLocation != Vector3.Zero &&
937 GodLevel < 200 &&
938 ((land.LandData.OwnerID != m_uuid &&
939 (!m_scene.Permissions.IsGod(m_uuid)) &&
940 (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid))) || (m_teleportFlags & TeleportFlags.ViaLocation) != 0))
941 {
942 pos = land.LandData.UserLocation;
943 }
944 }
945
946 land.SendLandUpdateToClient(ControllingClient);
947 }
948
949 if (pos.X < 0 || pos.Y < 0 || pos.Z < 0)
950 {
951 Vector3 emergencyPos = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 128);
952
953 if (pos.X < 0)
954 {
955 emergencyPos.X = (int)Constants.RegionSize + pos.X;
956 if (!(pos.Y < 0))
957 emergencyPos.Y = pos.Y;
958 if (!(pos.Z < 0))
959 emergencyPos.Z = pos.Z;
960 }
961 if (pos.Y < 0)
962 {
963 emergencyPos.Y = (int)Constants.RegionSize + pos.Y;
964 if (!(pos.X < 0))
965 emergencyPos.X = pos.X;
966 if (!(pos.Z < 0))
967 emergencyPos.Z = pos.Z;
968 }
969 if (pos.Z < 0)
970 {
971 emergencyPos.Z = 128;
972 if (!(pos.Y < 0))
973 emergencyPos.Y = pos.Y;
974 if (!(pos.X < 0))
975 emergencyPos.X = pos.X;
976 }
977 }
978 924
979 if (pos.X < 0f || pos.Y < 0f || pos.Z < 0f) 925 if (pos.X < 0f || pos.Y < 0f || pos.Z < 0f)
980 { 926 {
@@ -1815,7 +1761,7 @@ namespace OpenSim.Region.Framework.Scenes
1815 1761
1816// m_log.DebugFormat( 1762// m_log.DebugFormat(
1817// "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", 1763// "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}",
1818 Name, pos, m_scene.RegionInfo.RegionName); 1764// Name, pos, m_scene.RegionInfo.RegionName);
1819 1765
1820 if (pos.X < 0 || pos.X >= Constants.RegionSize 1766 if (pos.X < 0 || pos.X >= Constants.RegionSize
1821 || pos.Y < 0 || pos.Y >= Constants.RegionSize 1767 || pos.Y < 0 || pos.Y >= Constants.RegionSize
@@ -4062,5 +4008,34 @@ namespace OpenSim.Region.Framework.Scenes
4062 ControllingClient.SendAlertMessage("Can't teleport closer to destination"); 4008 ControllingClient.SendAlertMessage("Can't teleport closer to destination");
4063 } 4009 }
4064 } 4010 }
4011
4012 private void CheckAndAdjustLandingPoint(ref Vector3 pos)
4013 {
4014 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
4015 if (land != null)
4016 {
4017 // If we come in via login, landmark or map, we want to
4018 // honor landing points. If we come in via Lure, we want
4019 // to ignore them.
4020 if ((m_teleportFlags & (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID)) == (TeleportFlags.ViaLogin | TeleportFlags.ViaRegionID) ||
4021 (m_teleportFlags & TeleportFlags.ViaLandmark) != 0 ||
4022 (m_teleportFlags & TeleportFlags.ViaLocation) != 0)
4023 {
4024 // Don't restrict gods, estate managers, or land owners to
4025 // the TP point. This behaviour mimics agni.
4026 if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
4027 land.LandData.UserLocation != Vector3.Zero &&
4028 GodLevel < 200 &&
4029 ((land.LandData.OwnerID != m_uuid &&
4030 (!m_scene.Permissions.IsGod(m_uuid)) &&
4031 (!m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid))) || (m_teleportFlags & TeleportFlags.ViaLocation) != 0))
4032 {
4033 pos = land.LandData.UserLocation;
4034 }
4035 }
4036
4037 land.SendLandUpdateToClient(ControllingClient);
4038 }
4039 }
4065 } 4040 }
4066} 4041}