aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-12 18:16:06 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-12 18:16:06 -0400
commit2564533a4860a8452abc27ba05115ca11ed4a787 (patch)
tree67c5dfb2e892f0d492d977b8a5fa42321f2fa4a5 /src/engine.cpp
parent8f0db67c5fdbc1e7b8759f44b45ad64caf336cb5 (diff)
Ability to pass world data into Lua
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index ecc6501..6e6a0e5 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -147,9 +147,11 @@ void Engine::run(void)
GameState::save("save.json", entities);
// Remove all Lua references from entities
- entities.each<Scripted>([](entityx::Entity, Scripted &f){ f.cleanup(); });
- entities.each<EventListener>([](entityx::Entity, EventListener &f){
+ entities.each<Scripted>([](entityx::Entity, Scripted &f) {
f.cleanup(); });
+ entities.each<EventListener>([](entityx::Entity, EventListener &f) {
+ f.cleanup(); });
+ systems.system<WorldSystem>()->cleanup();
}
bool Engine::shouldRun(void)