Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - update archetypes for run criterias #2177

Closed
wants to merge 3 commits into from

Conversation

mockersf
Copy link
Member

fixes #2000

archetypes were not updated for run criteria on a stage or on a system set

@mockersf mockersf added C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events labels May 16, 2021
Copy link
Contributor

@Ratysz Ratysz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hm. I guess exclusive systems suffer from the same bug?

@cart
Copy link
Member

cart commented Jul 12, 2021

Yup I've already fixed the exclusive system bug in the pipelined rendering branch. Planned on upstreaming but never got around to it :)

    fn run(&mut self, world: &mut World) {
        let archetypes = world.archetypes();
        let new_generation = archetypes.generation();
        let old_generation = std::mem::replace(&mut self.archetype_generation, new_generation);
        let archetype_index_range = old_generation.value()..new_generation.value();

        for archetype in archetypes.archetypes[archetype_index_range].iter() {
            self.system.new_archetype(archetype);
        }
        self.system.run((), world);
        self.system.apply_buffers(world);
    }

@alice-i-cecile
Copy link
Member

We should include the exclusive system fix in the same PR right?

@mockersf
Copy link
Member Author

We should include the exclusive system fix in the same PR right?

added fix and test for exclusive systems

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jul 12, 2021
@cart
Copy link
Member

cart commented Jul 13, 2021

bors r+

bors bot pushed a commit that referenced this pull request Jul 13, 2021
fixes #2000 

archetypes were not updated for run criteria on a stage or on a system set
@bors bors bot changed the title update archetypes for run criterias [Merged by Bors] - update archetypes for run criterias Jul 13, 2021
@bors bors bot closed this Jul 13, 2021
ostwilkens pushed a commit to ostwilkens/bevy that referenced this pull request Jul 27, 2021
fixes bevyengine#2000 

archetypes were not updated for run criteria on a stage or on a system set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query in a run criteria system doesn't work
5 participants