diff --git a/src/abilities/thrown.rs b/src/abilities/thrown.rs index 22c255d..b3aba8b 100644 --- a/src/abilities/thrown.rs +++ b/src/abilities/thrown.rs @@ -143,7 +143,9 @@ fn shot_collision( let shot_entity = if query_shot.contains(*e1) { *e1 } else { *e2 }; - let shot_pos = query_shot.get(shot_entity).unwrap().1.translation; + let Ok(shot_pos) = query_shot.get(shot_entity).map(|(_, t)| t.translation) else { + continue; + }; commands.entity(shot_entity).despawn_recursive();