aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c89f656..ad66273 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -888,13 +888,43 @@ namespace OpenSim.Region.Framework.Scenes
888 if (land != null) 888 if (land != null)
889 { 889 {
890 //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. 890 //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni.
891 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero && m_userLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid) && land.LandData.OwnerID != m_uuid) 891 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero && UserLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(m_uuid) && land.LandData.OwnerID != m_uuid)
892 { 892 {
893 pos = land.LandData.UserLocation; 893 pos = land.LandData.UserLocation;
894 } 894 }
895 } 895 }
896 } 896 }
897 897
898 if (pos.X < 0 || pos.Y < 0 || pos.Z < 0)
899 {
900 Vector3 emergencyPos = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 128);
901
902 if (pos.X < 0)
903 {
904 emergencyPos.X = (int)Constants.RegionSize + pos.X;
905 if (!(pos.Y < 0))
906 emergencyPos.Y = pos.Y;
907 if (!(pos.Z < 0))
908 emergencyPos.Z = pos.Z;
909 }
910 if (pos.Y < 0)
911 {
912 emergencyPos.Y = (int)Constants.RegionSize + pos.Y;
913 if (!(pos.X < 0))
914 emergencyPos.X = pos.X;
915 if (!(pos.Z < 0))
916 emergencyPos.Z = pos.Z;
917 }
918 if (pos.Z < 0)
919 {
920 emergencyPos.Z = 128;
921 if (!(pos.Y < 0))
922 emergencyPos.Y = pos.Y;
923 if (!(pos.X < 0))
924 emergencyPos.X = pos.X;
925 }
926 }
927
898 if (pos.X < 0f || pos.Y < 0f || pos.Z < 0f) 928 if (pos.X < 0f || pos.Y < 0f || pos.Z < 0f)
899 { 929 {
900 m_log.WarnFormat( 930 m_log.WarnFormat(