summaryrefslogtreecommitdiff
path: root/ecs/src/relationship.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-02-06 13:38:46 +0100
committerHampusM <hampus@hampusmat.com>2025-02-12 21:29:41 +0100
commit64eddc633cea0f4bc5603cc2d4c4c6eafac5c177 (patch)
tree3248da82180c4307f4b7ca2a71c16dec32fb8cb3 /ecs/src/relationship.rs
parent2a8718f7c671ab1fc5e38340b467e2bd77f16cc0 (diff)
refactor(ecs): rewrite component storageHEADmaster
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(|_| {