BulletSim: fix exception when re-creating the terrain when loading an OAR file

user_profiles
Robert Adams 2013-01-07 16:04:21 -08:00
parent 2e5222055f
commit 599dbc3d95
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ public sealed class BSTerrainMesh : BSTerrainPhys
PhysicsScene.PE.RemoveObjectFromWorld(PhysicsScene.World, m_terrainBody);
// Frees both the body and the shape.
PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_terrainBody);
m_terrainBody.Clear();
m_terrainShape.Clear();
}
}