diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index f75c841b..fe9c9b1b 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -380,6 +380,12 @@ static void Engine_stepFrame(Engine* that) { } } + // Step modules along with workers + internal->workerModuleIndex = 0; + internal->engineBarrier.wait(); + Engine_stepWorker(that, 0); + internal->workerBarrier.wait(); + // Step cables for (Cable* cable : that->internal->cables) { Cable_step(cable); @@ -397,12 +403,6 @@ static void Engine_stepFrame(Engine* that) { } } - // Step modules along with workers - internal->workerModuleIndex = 0; - internal->engineBarrier.wait(); - Engine_stepWorker(that, 0); - internal->workerBarrier.wait(); - internal->frame++; }