mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 10:46:00 +08:00
BulletSim: remove some errors on shutdown by moving terrain destruction until after physical object destruction. TerrainManager also made disposable and that feature used.
This commit is contained in:
@@ -349,8 +349,6 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
|
||||
// make sure no stepping happens while we're deleting stuff
|
||||
m_initialized = false;
|
||||
|
||||
TerrainManager.ReleaseGroundPlaneAndTerrain();
|
||||
|
||||
foreach (KeyValuePair<uint, BSPhysObject> kvp in PhysObjects)
|
||||
{
|
||||
kvp.Value.Destroy();
|
||||
@@ -370,6 +368,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
|
||||
Shapes = null;
|
||||
}
|
||||
|
||||
if (TerrainManager != null)
|
||||
{
|
||||
TerrainManager.ReleaseGroundPlaneAndTerrain();
|
||||
TerrainManager.Dispose();
|
||||
TerrainManager = null;
|
||||
}
|
||||
|
||||
// Anything left in the unmanaged code should be cleaned out
|
||||
BulletSimAPI.Shutdown2(World.ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user