From 6f582aeaff3f876cbf110eccedeac1886345d64c Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Wed, 18 Jun 2014 04:13:45 +0100 Subject: [PATCH] Fix previous commit to ignore water height and allow flying underwater (swimming) Signed-off-by: Michael Cerquoni --- .../Physics/BulletSPlugin/BSActorAvatarMove.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs index 54bae21175..557c4e254d 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs @@ -139,21 +139,6 @@ public class BSActorAvatarMove : BSActor } } - private float ComputeMinFlightHeight() - { - float waterHeight = m_physicsScene.TerrainManager.GetWaterLevelAtXYZ(m_controllingPrim.RawPosition); - float groundHeight = m_physicsScene.TerrainManager.GetTerrainHeightAtXYZ(m_controllingPrim.RawPosition); - - if (groundHeight > waterHeight) - { - return groundHeight + 8f; - } - else - { - return waterHeight + 8f; - } - } - private void DeactivateAvatarMove() { if (m_velocityMotor != null) @@ -283,7 +268,7 @@ public class BSActorAvatarMove : BSActor //Alicia: Maintain minimum height when flying if (m_controllingPrim.Flying) { - float hover_height = ComputeMinFlightHeight(); + float hover_height = m_physicsScene.TerrainManager.GetTerrainHeightAtXYZ(m_controllingPrim.RawPosition) + 8f; if( m_controllingPrim.Position.Z < hover_height) {