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.
trunk
Melanie Thielker 2009-07-08 14:36:00 +00:00
parent f4498983aa
commit 2d949c1f25
1 changed files with 3 additions and 1 deletions

View File

@ -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)