mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
double event handlers calls fix
This commit is contained in:
parent
c819e8e116
commit
a3d3c3a46b
2 changed files with 21 additions and 0 deletions
|
|
@ -125,6 +125,15 @@ void scripting::on_world_quit() {
|
|||
for (auto& pack : scripting::engine->getContentPacks()) {
|
||||
emit_event(pack.id + ".worldquit");
|
||||
}
|
||||
|
||||
state->getglobal("pack");
|
||||
for (auto& pack : scripting::engine->getContentPacks()) {
|
||||
state->getfield("unload");
|
||||
state->pushstring(pack.id);
|
||||
state->callNoThrow(1);
|
||||
}
|
||||
state->pop();
|
||||
|
||||
if (state->getglobal("__scripts_cleanup")) {
|
||||
state->callNoThrow(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue