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.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 01facd1..b85a138 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1020,6 +1020,17 @@ namespace OpenSim.Region.Framework.Scenes
1020 look = new Vector3(0.99f, 0.042f, 0); 1020 look = new Vector3(0.99f, 0.042f, 0);
1021 } 1021 }
1022 1022
1023 // Prevent teleporting to an underground location
1024 // (may crash client otherwise)
1025 //
1026 Vector3 pos = AbsolutePosition;
1027 float ground = m_scene.GetGroundHeight(pos.X, pos.Y);
1028 if (pos.Z < ground + 1.5f)
1029 {
1030 pos.Z = ground + 1.5f;
1031 AbsolutePosition = pos;
1032 }
1033
1023 if (m_isChildAgent) 1034 if (m_isChildAgent)
1024 { 1035 {
1025 m_isChildAgent = false; 1036 m_isChildAgent = false;