aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs17
1 files changed, 1 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
index 54bae21..557c4e2 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
@@ -139,21 +139,6 @@ public class BSActorAvatarMove : BSActor
139 } 139 }
140 } 140 }
141 141
142 private float ComputeMinFlightHeight()
143 {
144 float waterHeight = m_physicsScene.TerrainManager.GetWaterLevelAtXYZ(m_controllingPrim.RawPosition);
145 float groundHeight = m_physicsScene.TerrainManager.GetTerrainHeightAtXYZ(m_controllingPrim.RawPosition);
146
147 if (groundHeight > waterHeight)
148 {
149 return groundHeight + 8f;
150 }
151 else
152 {
153 return waterHeight + 8f;
154 }
155 }
156
157 private void DeactivateAvatarMove() 142 private void DeactivateAvatarMove()
158 { 143 {
159 if (m_velocityMotor != null) 144 if (m_velocityMotor != null)
@@ -283,7 +268,7 @@ public class BSActorAvatarMove : BSActor
283 //Alicia: Maintain minimum height when flying 268 //Alicia: Maintain minimum height when flying
284 if (m_controllingPrim.Flying) 269 if (m_controllingPrim.Flying)
285 { 270 {
286 float hover_height = ComputeMinFlightHeight(); 271 float hover_height = m_physicsScene.TerrainManager.GetTerrainHeightAtXYZ(m_controllingPrim.RawPosition) + 8f;
287 272
288 if( m_controllingPrim.Position.Z < hover_height) 273 if( m_controllingPrim.Position.Z < hover_height)
289 { 274 {