aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAliciaRaven2014-06-18 04:13:45 +0100
committerJustin Clark-Casey2014-08-02 00:48:59 +0100
commit6f582aeaff3f876cbf110eccedeac1886345d64c (patch)
tree0026931e7b147d4b77f5d8f6250739fafe8d60c1 /OpenSim/Region
parentAdd upward force to flight when close to the ground. Prevents current belly f... (diff)
downloadopensim-SC_OLD-6f582aeaff3f876cbf110eccedeac1886345d64c.zip
opensim-SC_OLD-6f582aeaff3f876cbf110eccedeac1886345d64c.tar.gz
opensim-SC_OLD-6f582aeaff3f876cbf110eccedeac1886345d64c.tar.bz2
opensim-SC_OLD-6f582aeaff3f876cbf110eccedeac1886345d64c.tar.xz
Fix previous commit to ignore water height and allow flying underwater (swimming)
Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
Diffstat (limited to 'OpenSim/Region')
-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 {