aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
authorRobert Adams2012-08-25 23:18:46 -0700
committerRobert Adams2012-08-31 11:41:18 -0700
commit7c140570db3b01eb83efc0d42a47715d3047e376 (patch)
treeb077012e0c00cc7bb07f6e81e07359e14ffd2721 /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
parentBulletSim: unify physical objects under BSPhysObjects. Now BSScene and BSLink... (diff)
downloadopensim-SC-7c140570db3b01eb83efc0d42a47715d3047e376.zip
opensim-SC-7c140570db3b01eb83efc0d42a47715d3047e376.tar.gz
opensim-SC-7c140570db3b01eb83efc0d42a47715d3047e376.tar.bz2
opensim-SC-7c140570db3b01eb83efc0d42a47715d3047e376.tar.xz
BulletSim: Changes to terrain storage and management so mega-regions work.
Moved all terrain code out of BSScene and into new BSTerrainManager. Added logic to manage multiple terrains for mega-regions. Added new functions to BulletSimAPI to match the library. Moved all of the terrain creation and setup logic from C++ code to C# code. The unused code has not yet been removed from either place. Soon. Moved checks for avatar above ground and in bounds into BSCharacter.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index d7213fc..8169e99 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -465,6 +465,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
465 } 465 }
466 }//end SetDefaultsForType 466 }//end SetDefaultsForType
467 467
468 // One step of the vehicle properties for the next 'pTimestep' seconds.
468 internal void Step(float pTimestep) 469 internal void Step(float pTimestep)
469 { 470 {
470 if (m_type == Vehicle.TYPE_NONE) return; 471 if (m_type == Vehicle.TYPE_NONE) return;
@@ -592,9 +593,9 @@ namespace OpenSim.Region.Physics.BulletSPlugin
592 } 593 }
593 594
594 // If below the terrain, move us above the ground a little. 595 // If below the terrain, move us above the ground a little.
595 if (pos.Z < m_prim.Scene.GetTerrainHeightAtXYZ(pos)) 596 if (pos.Z < m_prim.Scene.TerrainManager.GetTerrainHeightAtXYZ(pos))
596 { 597 {
597 pos.Z = m_prim.Scene.GetTerrainHeightAtXYZ(pos) + 2; 598 pos.Z = m_prim.Scene.TerrainManager.GetTerrainHeightAtXYZ(pos) + 2;
598 m_prim.Position = pos; 599 m_prim.Position = pos;
599 VDetailLog("{0},MoveLinear,terrainHeight,pos={1}", m_prim.LocalID, pos); 600 VDetailLog("{0},MoveLinear,terrainHeight,pos={1}", m_prim.LocalID, pos);
600 } 601 }
@@ -609,7 +610,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
609 } 610 }
610 if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) != 0) 611 if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) != 0)
611 { 612 {
612 m_VhoverTargetHeight = m_prim.Scene.GetTerrainHeightAtXY(pos.X, pos.Y) + m_VhoverHeight; 613 m_VhoverTargetHeight = m_prim.Scene.TerrainManager.GetTerrainHeightAtXY(pos.X, pos.Y) + m_VhoverHeight;
613 } 614 }
614 if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) != 0) 615 if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) != 0)
615 { 616 {
@@ -673,7 +674,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
673 { 674 {
674 grav.Z = (float)(grav.Z * 1.125); 675 grav.Z = (float)(grav.Z * 1.125);
675 } 676 }
676 float terraintemp = m_prim.Scene.GetTerrainHeightAtXYZ(pos); 677 float terraintemp = m_prim.Scene.TerrainManager.GetTerrainHeightAtXYZ(pos);
677 float postemp = (pos.Z - terraintemp); 678 float postemp = (pos.Z - terraintemp);
678 if (postemp > 2.5f) 679 if (postemp > 2.5f)
679 { 680 {