auto lua modules removal on quit

This commit is contained in:
MihailRis
2024-02-21 11:20:53 +03:00
parent 241570ac82
commit fcb396344c
2 changed files with 23 additions and 12 deletions
+3
View File
@@ -124,6 +124,9 @@ void scripting::on_world_quit() {
state->callNoThrow(0);
}
}
if (state->getglobal("__scripts_cleanup")) {
state->callNoThrow(0);
}
scripting::level = nullptr;
scripting::content = nullptr;
scripting::indices = nullptr;