From fb82e3cc2918d0c81839cf05803c8b96b3fa1c6d Mon Sep 17 00:00:00 2001 From: yuni Date: Sat, 13 Jul 2024 13:24:40 +0200 Subject: [PATCH] add comment about possible panic --- src/hud.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hud.rs b/src/hud.rs index d58e7aa..95e0be9 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -1094,6 +1094,7 @@ fn handle_target_event( play_sfx = true; } if let Some(entity) = target { + // TODO: This can panic if the entity despawns in the meantime commands.entity(*entity).insert(IsTargeted); play_sfx = true;