Browse Source

Make engine step modules first, then step cables in Engine::stepFrame().

tags/v2.5.0
Andrew Belt 1 year ago
parent
commit
fb531c5a66
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      src/engine/Engine.cpp

+ 6
- 6
src/engine/Engine.cpp View File

@@ -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++;
}



Loading…
Cancel
Save