Skip to content

Commit

Permalink
fix system context setting
Browse files Browse the repository at this point in the history
  • Loading branch information
minecrawler committed Feb 8, 2024
1 parent 17f6749 commit 4609155
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/world/runtime/runtime-world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class RuntimeWorld implements IRuntimeWorld, IMutableWorld {

for (scheduler of this.config.stateSchedulers.values()) {
for (system of scheduler.getSystems()) {
system.setRuntimeContext(this);
this.systems.add(system);
}
}
Expand Down Expand Up @@ -173,8 +174,7 @@ export class RuntimeWorld implements IRuntimeWorld, IMutableWorld {
let i, stage, system, systems;

schedulers
.map(scheduler => scheduler.pipeline.getGroups())
.flat()
.flatMap(scheduler => scheduler.pipeline.getGroups())
.forEach(group => {
for (stage of group.stages) {
systems = stage.systems;
Expand All @@ -199,7 +199,6 @@ export class RuntimeWorld implements IRuntimeWorld, IMutableWorld {
let query, system;

for (system of this.config.defaultScheduler.getSystems()) {
system.setRuntimeContext(this);
for (query of getQueriesFromSystem(system)) {
this.queries.add(query);
}
Expand Down

0 comments on commit 4609155

Please sign in to comment.