From 099e935e3e2ee8484ac1111a3bbe6e7de8b02583 Mon Sep 17 00:00:00 2001 From: yuni Date: Thu, 23 May 2024 05:01:53 +0200 Subject: [PATCH] avoid errors during player death --- src/actor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 2e2894b..81c4151 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -32,7 +32,7 @@ impl Plugin for ActorPlugin { update_power, handle_wants_maxrotation, handle_wants_maxvelocity, - handle_wants_lookat, + handle_wants_lookat.run_if(alive), ), ); app.add_systems( @@ -567,7 +567,6 @@ fn handle_wants_lookat( let player_pos = if let Ok(player_pos) = q_playercam.get_single() { player_pos } else { - error!("Can't find player position"); return; };