From fb531c5a665fb849c5a1851a7e3de9a8b9ab0069 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 12 Sep 2023 17:35:32 -0400 Subject: [PATCH] Make engine step modules first, then step cables in Engine::stepFrame(). --- src/engine/Engine.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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++; }