* This limits avatar to the heightfield height if they teleport or cross a border to a position below it. After teleporting, you can go under the terrain if you like as usual.

0.6.0-stable
Teravus Ovares 2008-06-06 13:24:40 +00:00
parent c892ddcd20
commit 7137b13498
1 changed files with 6 additions and 1 deletions

View File

@ -592,7 +592,12 @@ namespace OpenSim.Region.Environment.Scenes
// Name, UUID, m_scene.RegionInfo.RegionName);
m_isChildAgent = false;
float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y);
float newPosZ = posZLimit + m_avHeight;
if (posZLimit >= (pos.Z -(m_avHeight/2)) && !(Single.IsInfinity(newPosZ) && Single.IsNaN(newPosZ)))
{
pos.Z = newPosZ;
}
AbsolutePosition = pos;
AddToPhysicalScene();