avoid errors during player death

This commit is contained in:
yuni 2024-05-23 05:01:53 +02:00
parent 2a6e14aa90
commit 099e935e3e

View file

@ -32,7 +32,7 @@ impl Plugin for ActorPlugin {
update_power, update_power,
handle_wants_maxrotation, handle_wants_maxrotation,
handle_wants_maxvelocity, handle_wants_maxvelocity,
handle_wants_lookat, handle_wants_lookat.run_if(alive),
), ),
); );
app.add_systems( app.add_systems(
@ -567,7 +567,6 @@ fn handle_wants_lookat(
let player_pos = if let Ok(player_pos) = q_playercam.get_single() { let player_pos = if let Ok(player_pos) = q_playercam.get_single() {
player_pos player_pos
} else { } else {
error!("Can't find player position");
return; return;
}; };