aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-08 10:22:51 +0000
committerMelanie Thielker2009-07-08 10:22:51 +0000
commitf4498983aa2f498321fbc508a2f41b390914bee7 (patch)
tree18f6bf0fb4e3c28d36a975bb2df05cb32df25ebf /OpenSim/Region/ScriptEngine
parentPrevent teleports from ending underground (diff)
downloadopensim-SC_OLD-f4498983aa2f498321fbc508a2f41b390914bee7.zip
opensim-SC_OLD-f4498983aa2f498321fbc508a2f41b390914bee7.tar.gz
opensim-SC_OLD-f4498983aa2f498321fbc508a2f41b390914bee7.tar.bz2
opensim-SC_OLD-f4498983aa2f498321fbc508a2f41b390914bee7.tar.xz
Prevent scripts from moving prims underground
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a90d20c..9f02880 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1855,8 +1855,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1855 { 1855 {
1856 targetPos = currentPos + m_ScriptDistanceFactor * 10.0f * llVecNorm(targetPos - currentPos); 1856 targetPos = currentPos + m_ScriptDistanceFactor * 10.0f * llVecNorm(targetPos - currentPos);
1857 } 1857 }
1858
1859 1858
1859 float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
1860 if (targetPos.z < ground)
1861 targetPos.z = ground;
1862
1860 if (part.ParentGroup == null) 1863 if (part.ParentGroup == null)
1861 { 1864 {
1862 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1865 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));