aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie2010-05-21 03:03:35 +0100
committerMelanie2010-05-21 03:03:35 +0100
commitb6674c9b7676aa522a4cc5201a6035d89e138655 (patch)
tree1c047eb52906800973ed00e151bb72be5ca91fa5 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentInitialise m_initialSitTarget to ZERO_VACTOR for safety's sake as per convo w... (diff)
parentMerge branch '0.6.9-post-fixes' into careminster (diff)
downloadopensim-SC-b6674c9b7676aa522a4cc5201a6035d89e138655.zip
opensim-SC-b6674c9b7676aa522a4cc5201a6035d89e138655.tar.gz
opensim-SC-b6674c9b7676aa522a4cc5201a6035d89e138655.tar.bz2
opensim-SC-b6674c9b7676aa522a4cc5201a6035d89e138655.tar.xz
Merge branch 'careminster' into careminster-presence-refactor
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(