Skip to content

Commit

Permalink
remove duplicate Parent update, properly set PreviousParent
Browse files Browse the repository at this point in the history
  • Loading branch information
siler committed Mar 18, 2021
1 parent ea02255 commit c0d4423
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use bevy_ecs::{
query::Without,
system::{Commands, Query},
};
use bevy_utils::HashMap;
use smallvec::SmallVec;

pub fn parent_update_system(
mut commands: Commands,
Expand Down Expand Up @@ -97,9 +95,11 @@ mod test {
);

// Parent `e1` to `e2`.
(*world.get_mut::<Parent>(children[0]).unwrap()).0 = children[1];
let mut commands = Commands::default();
commands.push_children(children[1], &[children[0]]);

schedule.run(&mut world);
commands.apply(&mut world, &mut resources);
schedule.run(&mut world, &mut resources);

assert_eq!(
world
Expand Down

0 comments on commit c0d4423

Please sign in to comment.