add comment about possible panic

This commit is contained in:
yuni 2024-07-13 13:24:40 +02:00
parent e5f9409fd8
commit fb82e3cc29

View file

@ -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;