mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-09 10:07:58 -06:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user