only update components for entities in map (#1023)
This commit is contained in:
parent
19c4f331ac
commit
c54179b182
@ -202,8 +202,10 @@ impl<C: Component + MapEntities> FromType<C> for ReflectMapEntities {
|
|||||||
fn from_type() -> Self {
|
fn from_type() -> Self {
|
||||||
ReflectMapEntities {
|
ReflectMapEntities {
|
||||||
map_entities: |world, entity_map| {
|
map_entities: |world, entity_map| {
|
||||||
for mut component in &mut world.query_mut::<&mut C>() {
|
for entity in entity_map.values() {
|
||||||
component.map_entities(entity_map)?;
|
if let Ok(mut component) = world.get_mut::<C>(entity) {
|
||||||
|
component.map_entities(entity_map)?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user