aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index fa3110c..cb84456 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -818,6 +818,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
818 + hoverContribution 818 + hoverContribution
819 + limitMotorUpContribution; 819 + limitMotorUpContribution;
820 820
821 Vector3 newForce = buoyancyContribution;
822
821 // If not changing some axis, reduce out velocity 823 // If not changing some axis, reduce out velocity
822 if ((m_flags & (VehicleFlag.NO_X)) != 0) 824 if ((m_flags & (VehicleFlag.NO_X)) != 0)
823 newVelocity.X = 0; 825 newVelocity.X = 0;
@@ -845,7 +847,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
845 VehicleVelocity = newVelocity; 847 VehicleVelocity = newVelocity;
846 848
847 // Other linear forces are applied as forces. 849 // Other linear forces are applied as forces.
848 Vector3 totalDownForce = buoyancyContribution * m_vehicleMass; 850 Vector3 totalDownForce = newForce * m_vehicleMass;
849 if (!totalDownForce.ApproxEquals(Vector3.Zero, 0.01f)) 851 if (!totalDownForce.ApproxEquals(Vector3.Zero, 0.01f))
850 { 852 {
851 VehicleAddForce(totalDownForce); 853 VehicleAddForce(totalDownForce);
@@ -1005,8 +1007,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1005 // has a decay factor. This says this force should 1007 // has a decay factor. This says this force should
1006 // be computed with a motor. 1008 // be computed with a motor.
1007 // TODO: add interaction with banking. 1009 // TODO: add interaction with banking.
1008 VDetailLog("{0}, MoveLinear,limitMotorUp,distAbove={1},downForce={2}", 1010 VDetailLog("{0}, MoveLinear,limitMotorUp,distAbove={1},colliding={2},ret={3}",
1009 Prim.LocalID, distanceAboveGround, ret); 1011 Prim.LocalID, distanceAboveGround, Prim.IsColliding, ret);
1010 } 1012 }
1011 return ret; 1013 return ret;
1012 } 1014 }