diff options
author | AliciaRaven | 2014-06-18 04:13:45 +0100 |
---|---|---|
committer | Michael Cerquoni | 2014-06-17 23:06:49 -0400 |
commit | db0c41501c0ff3c45660c4c5360f98e109299b66 (patch) | |
tree | 6c439ade568cf9d43bd52aa56311ee0c28b11670 /OpenSim/Region/Physics/BulletSPlugin | |
parent | Add upward force to flight when close to the ground. Prevents current belly f... (diff) | |
download | opensim-SC-db0c41501c0ff3c45660c4c5360f98e109299b66.zip opensim-SC-db0c41501c0ff3c45660c4c5360f98e109299b66.tar.gz opensim-SC-db0c41501c0ff3c45660c4c5360f98e109299b66.tar.bz2 opensim-SC-db0c41501c0ff3c45660c4c5360f98e109299b66.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/Physics/BulletSPlugin')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs | 17 |
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 | { |