diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs index 86ccfbb..d99a50f 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |||
@@ -137,9 +137,9 @@ public sealed class BSTerrainManager : IDisposable | |||
137 | BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, | 137 | BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, |
138 | BSParam.TerrainCollisionMargin), | 138 | BSParam.TerrainCollisionMargin), |
139 | BSPhysicsShapeType.SHAPE_GROUNDPLANE); | 139 | BSPhysicsShapeType.SHAPE_GROUNDPLANE); |
140 | m_groundPlane = new BulletBody(BSScene.GROUNDPLANE_ID, | 140 | m_groundPlane = PhysicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, |
141 | BulletSimAPI.CreateBodyWithDefaultMotionState2(groundPlaneShape.ptr, BSScene.GROUNDPLANE_ID, | 141 | BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); |
142 | Vector3.Zero, Quaternion.Identity)); | 142 | |
143 | BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 143 | BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr); |
144 | BulletSimAPI.UpdateSingleAabb2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 144 | BulletSimAPI.UpdateSingleAabb2(PhysicsScene.World.ptr, m_groundPlane.ptr); |
145 | // Ground plane does not move | 145 | // Ground plane does not move |
@@ -160,7 +160,7 @@ public sealed class BSTerrainManager : IDisposable | |||
160 | { | 160 | { |
161 | if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr)) | 161 | if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr)) |
162 | { | 162 | { |
163 | BulletSimAPI.DestroyObject2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 163 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_groundPlane); |
164 | } | 164 | } |
165 | m_groundPlane.Clear(); | 165 | m_groundPlane.Clear(); |
166 | } | 166 | } |