aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
authorRobert Adams2012-11-28 08:05:01 -0800
committerRobert Adams2012-11-28 09:48:33 -0800
commit0a66317fa6414dff9a7a4ab5bae10802e1e6693f (patch)
treea0705a43191649f43c80d43ee8537f5ab6581e94 /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.zip
opensim-SC_OLD-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.tar.gz
opensim-SC_OLD-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.tar.bz2
opensim-SC_OLD-0a66317fa6414dff9a7a4ab5bae10802e1e6693f.tar.xz
BulletSim: move GetWaterLevelAtXYZ from BSScene to BSPhysTerrain.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index 74eb9ab..b6e3594 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -713,7 +713,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
713 // We should hover, get the target height 713 // We should hover, get the target height
714 if ((m_flags & VehicleFlag.HOVER_WATER_ONLY) != 0) 714 if ((m_flags & VehicleFlag.HOVER_WATER_ONLY) != 0)
715 { 715 {
716 m_VhoverTargetHeight = Prim.PhysicsScene.GetWaterLevelAtXYZ(pos) + m_VhoverHeight; 716 m_VhoverTargetHeight = Prim.PhysicsScene.TerrainManager.GetWaterLevelAtXYZ(pos) + m_VhoverHeight;
717 } 717 }
718 if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) != 0) 718 if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) != 0)
719 { 719 {
@@ -730,6 +730,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
730 if (pos.Z > m_VhoverTargetHeight) 730 if (pos.Z > m_VhoverTargetHeight)
731 m_VhoverTargetHeight = pos.Z; 731 m_VhoverTargetHeight = pos.Z;
732 } 732 }
733
733 if ((m_flags & VehicleFlag.LOCK_HOVER_HEIGHT) != 0) 734 if ((m_flags & VehicleFlag.LOCK_HOVER_HEIGHT) != 0)
734 { 735 {
735 if (Math.Abs(pos.Z - m_VhoverTargetHeight) > 0.2f) 736 if (Math.Abs(pos.Z - m_VhoverTargetHeight) > 0.2f)
@@ -883,8 +884,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
883 // Sum velocities 884 // Sum velocities
884 m_lastAngularVelocity = angularMotorContribution 885 m_lastAngularVelocity = angularMotorContribution
885 + verticalAttractionContribution 886 + verticalAttractionContribution
886 + bankingContribution 887 + deflectionContribution
887 + deflectionContribution; 888 + bankingContribution;
888 889
889 // ================================================================== 890 // ==================================================================
890 //Offset section 891 //Offset section
@@ -921,8 +922,9 @@ namespace OpenSim.Region.Physics.BulletSPlugin
921 if (m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) 922 if (m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f))
922 { 923 {
923 m_lastAngularVelocity = Vector3.Zero; // Reduce small value to zero. 924 m_lastAngularVelocity = Vector3.Zero; // Reduce small value to zero.
924 Prim.ZeroAngularMotion(true); 925 // TODO: zeroing is good but it also sets values in unmanaged code. Remove the stores when idle.
925 VDetailLog("{0},MoveAngular,zeroAngularMotion,lastAngular={1}", Prim.LocalID, m_lastAngularVelocity); 926 VDetailLog("{0},MoveAngular,zeroAngularMotion,lastAngular={1}", Prim.LocalID, m_lastAngularVelocity);
927 Prim.ZeroAngularMotion(true);
926 } 928 }
927 else 929 else
928 { 930 {