BulletSim: add clock and change logic for taint processing a little

so taints check if they are not in simulation time and execute
immediately if not.
This commit is contained in:
Robert Adams
2017-08-28 15:23:32 -07:00
parent 05b8ead8b2
commit 5c36561424
5 changed files with 62 additions and 27 deletions

View File

@@ -75,7 +75,7 @@ public sealed class BSShapeCollection : IDisposable
// Called at taint-time.
public bool GetBodyAndShape(bool forceRebuild, BulletWorld sim, BSPhysObject prim, PhysicalDestructionCallback bodyCallback)
{
m_physicsScene.AssertInTaintTime("BSShapeCollection.GetBodyAndShape");
m_physicsScene.AssertNotInSimulationTime("BSShapeCollection.GetBodyAndShape");
bool ret = false;
@@ -344,7 +344,7 @@ public sealed class BSShapeCollection : IDisposable
if (!body.HasPhysicalBody)
return;
m_physicsScene.AssertInTaintTime("BSShapeCollection.DereferenceBody");
m_physicsScene.AssertNotInSimulationTime("BSShapeCollection.DereferenceBody");
lock (m_collectionActivityLock)
{