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-input.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-input.cpp')
| -rw-r--r-- | src/serialization-input.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/serialization-input.cpp b/src/serialization-input.cpp index c4c5cc3..d8a2f86 100644 --- a/src/serialization-input.cpp +++ b/src/serialization-input.cpp @@ -2,8 +2,10 @@ #include "serialization-input.hpp" #include "compile-time-assert.hpp" +#include "game-settings.hpp" +#include "level.hpp" + #include "pk.h" -#include "scene.hpp" #include <cstring> @@ -200,7 +202,9 @@ void pke_deserialize_input_set(srlztn_deserialize_helper *h, pke_kve_container * } pke_input_action_set_handle action_set_handle = pke_input_register_set(set); - pke_scene_register_input_action_set(h->scene->scene_handle, action_set_handle); + if (pkeSettings.rt.activeLevel != nullptr) { + pke_level_register_input_action_set(pkeSettings.rt.activeLevel, action_set_handle); + } if (PK_HAS_FLAG(set.flags, PKE_INPUT_ACTION_SET_FLAG_AUTO_ENABLE)) { pke_input_activate_set(action_set_handle); } |
