diff options
author | HampusM <hampus@hampusmat.com> | 2025-02-06 13:38:46 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-02-12 21:29:41 +0100 |
commit | 64eddc633cea0f4bc5603cc2d4c4c6eafac5c177 (patch) | |
tree | 3248da82180c4307f4b7ca2a71c16dec32fb8cb3 /ecs/src/relationship.rs | |
parent | 2a8718f7c671ab1fc5e38340b467e2bd77f16cc0 (diff) |
Diffstat (limited to 'ecs/src/relationship.rs')
-rw-r--r-- | ecs/src/relationship.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ecs/src/relationship.rs b/ecs/src/relationship.rs index 143b589..54dc0cd 100644 --- a/ecs/src/relationship.rs +++ b/ecs/src/relationship.rs @@ -174,14 +174,15 @@ where let archetype = self.component_storage_lock.get_entity_archetype(*target)?; let entity = archetype - .get_entity(*target) + .get_entity_by_id(*target) .expect("Target entity is gone from archetype"); let component_index = archetype.get_index_for_component(ComponentT::id())?; let component = ComponentRefMut::new( entity - .get_component(component_index)? + .components + .get(component_index)? .component .write_nonblock() .unwrap_or_else(|_| { @@ -430,14 +431,15 @@ where let archetype = self.component_storage_lock.get_entity_archetype(*target)?; let entity = archetype - .get_entity(*target) + .get_entity_by_id(*target) .expect("Target entity is gone from archetype"); let component_index = archetype.get_index_for_component(ComponentT::id())?; let component = ComponentRef::new( entity - .get_component(component_index)? + .components + .get(component_index)? .component .read_nonblock() .unwrap_or_else(|_| { |