summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index ab7d211..448bf3d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -92,6 +92,9 @@ void Game_Tick(double delta) {
}
}
if (pkeSettings.rt.previousLevel != nullptr) {
+ if (pkeSettings.rt.previousLevel->pke_cb_teardown.func != nullptr) {
+ pkeSettings.rt.previousLevel->pke_cb_teardown.func();
+ }
pke_level_teardown(pkeSettings.rt.previousLevel);
pkeSettings.rt.previousLevel = nullptr;
}
@@ -114,7 +117,7 @@ void Game_Tick(double delta) {
}
if (pkeSettings.rt.activeLevel->pke_cb_tick.func != nullptr) {
- pkeSettings.rt.activeLevel->pke_cb_tick.func();
+ reinterpret_cast<void(*)(double delta)>(pkeSettings.rt.activeLevel->pke_cb_tick.func)(delta);
}
PkeCamera_Tick(delta);