small fix
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user