diff options
author | Robert Adams | 2012-12-15 11:31:26 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-16 21:19:11 -0800 |
commit | f3b1efd889e2e87f89c8e8da6a08089596c878f6 (patch) | |
tree | fd29934603bc991c7b1b35d4c3c60ec566d36a01 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |
parent | BulletSim: rip out old code for linkset child position fetching. BulletSim do... (diff) | |
download | opensim-SC_OLD-f3b1efd889e2e87f89c8e8da6a08089596c878f6.zip opensim-SC_OLD-f3b1efd889e2e87f89c8e8da6a08089596c878f6.tar.gz opensim-SC_OLD-f3b1efd889e2e87f89c8e8da6a08089596c878f6.tar.bz2 opensim-SC_OLD-f3b1efd889e2e87f89c8e8da6a08089596c878f6.tar.xz |
BulletSim: remove some errors on shutdown by moving terrain destruction until after physical object destruction. TerrainManager also made disposable and that feature used.
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 | ||