From 2d949c1f25e1fa1359a8f780675dbb0396b755d7 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 8 Jul 2009 14:36:00 +0000 Subject: Add DisableUndergroundMovement to scrpting API to allow underground movement if needed. Defaults to true, so those who want to continue using underground scripted prims need to add that option and set it. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9f02880..1d71da3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1857,7 +1857,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y); - if (targetPos.z < ground) + bool disable_underground_movement = m_ScriptEngine.Config.GetBoolean("DisableUndergroundMovement", true); + + if ((targetPos.z < ground) && disable_underground_movement) targetPos.z = ground; if (part.ParentGroup == null) -- cgit v1.1