diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index cf5bb57..ac99777 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -349,8 +349,6 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
349 | // make sure no stepping happens while we're deleting stuff | 349 | // make sure no stepping happens while we're deleting stuff |
350 | m_initialized = false; | 350 | m_initialized = false; |
351 | 351 | ||
352 | TerrainManager.ReleaseGroundPlaneAndTerrain(); | ||
353 | |||
354 | foreach (KeyValuePair<uint, BSPhysObject> kvp in PhysObjects) | 352 | foreach (KeyValuePair<uint, BSPhysObject> kvp in PhysObjects) |
355 | { | 353 | { |
356 | kvp.Value.Destroy(); | 354 | kvp.Value.Destroy(); |
@@ -370,6 +368,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
370 | Shapes = null; | 368 | Shapes = null; |
371 | } | 369 | } |
372 | 370 | ||
371 | if (TerrainManager != null) | ||
372 | { | ||
373 | TerrainManager.ReleaseGroundPlaneAndTerrain(); | ||
374 | TerrainManager.Dispose(); | ||
375 | TerrainManager = null; | ||
376 | } | ||
377 | |||
373 | // Anything left in the unmanaged code should be cleaned out | 378 | // Anything left in the unmanaged code should be cleaned out |
374 | BulletSimAPI.Shutdown2(World.ptr); | 379 | BulletSimAPI.Shutdown2(World.ptr); |
375 | 380 | ||