BulletSim: fix problem with multiple linksets stepping on each other if they are built at the same time.

integration
Robert Adams 2012-10-29 14:30:16 -07:00
parent 4cfa3be4ef
commit dae038a117
1 changed files with 4 additions and 3 deletions

View File

@ -578,12 +578,12 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
}
}
ProcessPostStepTaints();
// This causes the unmanaged code to output ALL the values found in ALL the objects in the world.
// Only enable this in a limited test world with few objects.
// BulletSimAPI.DumpAllInfo2(World.ptr); // DEBUG DEBUG DEBUG
ProcessPostStepTaints();
// The physics engine returns the number of milliseconds it simulated this call.
// These are summed and normalized to one second and divided by 1000 to give the reported physics FPS.
// We multiply by 55 to give a recognizable running rate (55 or less).
@ -766,9 +766,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
{
if (!m_initialized) return;
string uniqueIdent = ident + "-" + ID.ToString();
lock (_taintLock)
{
_postTaintOperations[ident] = new TaintCallbackEntry(ident + "-" + ID.ToString(), callback);
_postTaintOperations[uniqueIdent] = new TaintCallbackEntry(uniqueIdent, callback);
}
return;