* 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.
parent
c892ddcd20
commit
7137b13498
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue