Skip to content

Commit

Permalink
Removed original_entity field.
Browse files Browse the repository at this point in the history
  • Loading branch information
ickshonpe committed Jan 11, 2025
1 parent e214cdb commit 3693cbe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions crates/bevy_sprite/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,6 @@ pub struct ExtractedSprite {
pub flip_x: bool,
pub flip_y: bool,
pub anchor: Vec2,
/// For cases where additional [`ExtractedSprites`] are created during extraction, this stores the
/// entity that caused that creation for use in determining visibility.
pub original_entity: Option<Entity>,
pub render_entity: Entity,
pub slice_indices: Range<usize>,
}
Expand Down Expand Up @@ -416,7 +413,6 @@ pub fn extract_sprites(
flip_y: sprite.flip_y,
image_handle_id: sprite.image.id(),
anchor: sprite.anchor.as_vec(),
original_entity: Some(original_entity),
render_entity,
slice_indices: start..end,
},
Expand Down Expand Up @@ -451,7 +447,6 @@ pub fn extract_sprites(
flip_y: sprite.flip_y,
image_handle_id: sprite.image.id(),
anchor: sprite.anchor.as_vec(),
original_entity: Some(original_entity),
render_entity,
slice_indices: 0..0,
},
Expand Down Expand Up @@ -581,10 +576,7 @@ pub fn queue_sprites(
.reserve(extracted_sprites.sprites.len());

for (main_entity, extracted_sprite) in extracted_sprites.sprites.iter() {
let index = extracted_sprite
.original_entity
.unwrap_or(extracted_sprite.render_entity)
.index();
let index = main_entity.index();

if !view_entities.contains(index as usize) {
continue;
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_text/src/text2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ pub fn extract_text2d_sprite(
flip_x: false,
flip_y: false,
anchor: Anchor::Center.as_vec(),
original_entity: Some(original_entity),
render_entity: commands.spawn(TemporaryRenderEntity).id(),
slice_indices: start..end,
},
Expand Down

0 comments on commit 3693cbe

Please sign in to comment.