Skip to content

Commit

Permalink
Bug fix: system can't be re-added to list after removeAll().
Browse files Browse the repository at this point in the history
If a system's parent is already the current list, `add()` will skip adding that system. Normally this is fine because the parent is cleared if the system is removed, but `removeAll()` skipped that step, so you could have a system incorrectly claim to be in a list.
  • Loading branch information
player-03 authored Dec 19, 2023
1 parent 8e57842 commit 7c320eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/echoes/SystemList.hx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class SystemList extends System {
public function removeAll():SystemList {
for(system in systems) {
system.__deactivate__();
system.parent = null;
}
systems.resize(0);

Expand Down

0 comments on commit 7c320eb

Please sign in to comment.