run race only when player is alive

This commit is contained in:
yuni 2024-11-18 04:52:12 +01:00
parent 70c83295ca
commit 61cf744569

View file

@ -51,7 +51,7 @@ impl Plugin for GamePlugin {
.run_if(on_event::<AchievementEvent>()), .run_if(on_event::<AchievementEvent>()),
); );
app.add_systems(Update, check_achievements.run_if(game_running)); 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(Id2Pos(HashMap::new()));
app.insert_resource(Id2V(HashMap::new())); app.insert_resource(Id2V(HashMap::new()));
app.insert_resource(JupiterPos(DVec3::ZERO)); app.insert_resource(JupiterPos(DVec3::ZERO));