Allow the "debug scene set physics false|true" command to work when bulletsim physics is running in a separate thread.

This will also allow the "disable physics" setting in the region debug viewer dialog to work in this circumstance.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-07-29 01:21:15 +01:00
parent df816b38ac
commit 3654ae8d8c
8 changed files with 78 additions and 39 deletions

View File

@@ -821,7 +821,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
while (m_initialized)
{
int beginSimulationRealtimeMS = Util.EnvironmentTickCount();
DoPhysicsStep(BSParam.PhysicsTimeStep);
if (BSParam.Active)
DoPhysicsStep(BSParam.PhysicsTimeStep);
int simulationRealtimeMS = Util.EnvironmentTickCountSubtract(beginSimulationRealtimeMS);
int simulationTimeVsRealtimeDifferenceMS = ((int)(BSParam.PhysicsTimeStep*1000f)) - simulationRealtimeMS;