summaryrefslogtreecommitdiff
path: root/ecs/src/relationship.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/relationship.rs')
-rw-r--r--ecs/src/relationship.rs10
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(|_| {