Prevent scripts from moving prims underground

trunk
Melanie Thielker 2009-07-08 10:22:51 +00:00
parent d8fe7777bf
commit f4498983aa
1 changed files with 4 additions and 1 deletions

View File

@ -1856,6 +1856,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
targetPos = currentPos + m_ScriptDistanceFactor * 10.0f * llVecNorm(targetPos - currentPos); targetPos = currentPos + m_ScriptDistanceFactor * 10.0f * llVecNorm(targetPos - currentPos);
} }
float ground = World.GetGroundHeight((float)targetPos.x, (float)targetPos.y);
if (targetPos.z < ground)
targetPos.z = ground;
if (part.ParentGroup == null) if (part.ParentGroup == null)
{ {