mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
* 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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user