diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-09 16:05:14 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-09 16:05:14 -0400 |
| commit | 5daa12fed0449a7811fc25ec62236bc060a56fa7 (patch) | |
| tree | 5af5ff1c4de2ab49dd4d1db9934b3b4ee34a54c2 /src/serialization-component.cpp | |
| parent | c40277cd665e04d300ea839a1dd2ff675655f5fb (diff) | |
pke: first-pass promote pke_level over pke_scene
Major runtime ownership overhaul (scene -> level).
Major ecs 'marked for removal' overhaul, ensuring
that entities and their components are actually
being removed when levels are unloaded.
Diffstat (limited to 'src/serialization-component.cpp')
| -rw-r--r-- | src/serialization-component.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/serialization-component.cpp b/src/serialization-component.cpp index 266eb2d..a401d50 100644 --- a/src/serialization-component.cpp +++ b/src/serialization-component.cpp @@ -320,10 +320,11 @@ void pke_deserialize_instance(srlztn_deserialize_helper *h, pke_kve_container *k // entity = reinterpret_cast<CreateInst*>(et_ptr->createInstanceCallback.func)(); fprintf(stderr, "[%s] Attempted to call EntityType::createInstanceCallback and we have not yet defined a valid function signature\n", __FILE__); } else { - map.created_entity = EntityType_CreateGenericInstance(et_ptr, h->scene, &comp, &inst_pos); + map.created_entity = EntityType_CreateGenericInstance(et_ptr, h->level, &comp, &inst_pos); } } else { map.created_entity = ECS_CreateGenericEntity(); + ECS_CreateEntity(map.created_entity); map.created_instance = ECS_CreateInstance(map.created_entity, comp.uuid, nullptr, &inst_pos); } ECS_GetInstances(map.created_entity, instances); |
