aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-06 13:24:40 +0000
committerTeravus Ovares2008-06-06 13:24:40 +0000
commit7137b1349850030171509d0096b8cf9283fadf86 (patch)
tree2255344aa0bf3ced4ed844c53d1ff6aa53f8344d
parent* This wraps the autopilot request to the client's sit response. An interes... (diff)
downloadopensim-SC_OLD-7137b1349850030171509d0096b8cf9283fadf86.zip
opensim-SC_OLD-7137b1349850030171509d0096b8cf9283fadf86.tar.gz
opensim-SC_OLD-7137b1349850030171509d0096b8cf9283fadf86.tar.bz2
opensim-SC_OLD-7137b1349850030171509d0096b8cf9283fadf86.tar.xz
* 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.
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index aca0f9d..2215850 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -592,7 +592,12 @@ namespace OpenSim.Region.Environment.Scenes
592// Name, UUID, m_scene.RegionInfo.RegionName); 592// Name, UUID, m_scene.RegionInfo.RegionName);
593 593
594 m_isChildAgent = false; 594 m_isChildAgent = false;
595 595 float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y);
596 float newPosZ = posZLimit + m_avHeight;
597 if (posZLimit >= (pos.Z -(m_avHeight/2)) && !(Single.IsInfinity(newPosZ) && Single.IsNaN(newPosZ)))
598 {
599 pos.Z = newPosZ;
600 }
596 AbsolutePosition = pos; 601 AbsolutePosition = pos;
597 602
598 AddToPhysicalScene(); 603 AddToPhysicalScene();