Skip to content

Commit

Permalink
Add debug printing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Sep 9, 2024
1 parent 8dee7d3 commit 014c5f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/src/ghost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ impl Component for Ghost {
let ghost = *world.get::<Self>(targeted_entity).unwrap();
if let Some(mut visibility) = world.get_mut::<Visibility>(ghost.original_entity) {
*visibility = Visibility::Hidden;
debug!("applying {visibility:?} to `{}`", ghost.original_entity);
}
if ghost.remove_filters != LayerMask::NONE {
if let Some(mut collision_layers) =
Expand All @@ -51,6 +52,7 @@ impl Component for Ghost {
.on_remove(|mut world, targeted_entity, _component_id| {
let ghost = *world.get::<Self>(targeted_entity).unwrap();
if let Some(mut visibility) = world.get_mut::<Visibility>(ghost.original_entity) {
debug!("applying {visibility:?} to `{}`", ghost.original_entity);
*visibility = Visibility::Inherited;
}
if ghost.remove_filters != LayerMask::NONE {
Expand Down

0 comments on commit 014c5f6

Please sign in to comment.