From 61cf744569aeed387fb1930a3442065825546327 Mon Sep 17 00:00:00 2001 From: yuni Date: Mon, 18 Nov 2024 04:52:12 +0100 Subject: [PATCH] run race only when player is alive --- src/game.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game.rs b/src/game.rs index 9ec7c5b..0c71e35 100644 --- a/src/game.rs +++ b/src/game.rs @@ -51,7 +51,7 @@ impl Plugin for GamePlugin { .run_if(on_event::()), ); app.add_systems(Update, check_achievements.run_if(game_running)); - app.add_systems(Update, handle_race.run_if(game_running)); + app.add_systems(Update, handle_race.run_if(alive).run_if(game_running)); app.insert_resource(Id2Pos(HashMap::new())); app.insert_resource(Id2V(HashMap::new())); app.insert_resource(JupiterPos(DVec3::ZERO));