fix(game): resolve race condition in render dirty flag using bitwise OR

The render dirty flag was being reset instead of accumulated, causing
the game to become stuck and unplayable in web builds. Changed from
assignment to bitwise OR to preserve all dirty state updates.

Also adds game layout component and updates Justfile to build frontend.
This commit is contained in:
Ryan Walters
2025-11-22 21:14:24 -06:00
parent 9bf8d0428c
commit c306e992c4
4 changed files with 14 additions and 9 deletions

View File

@@ -521,7 +521,7 @@ impl Game {
stage_system.in_set(GameplaySet::Respond),
(
(|mut dirty: ResMut<RenderDirty>, score: Res<ScoreResource>, stage: Res<GameStage>| {
dirty.0 = score.is_changed() || stage.is_changed();
dirty.0 |= score.is_changed() || stage.is_changed();
}),
dirty_render_system.run_if(|dirty: Res<RenderDirty>| dirty.0.not()),
combined_render_system,