mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix entities.spawn in coroutines
This commit is contained in:
parent
35a6985d7e
commit
bbe5688a53
3 changed files with 12 additions and 3 deletions
|
|
@ -549,6 +549,7 @@ void scripting::on_entity_spawn(
|
|||
const dv::value& saved
|
||||
) {
|
||||
auto L = lua::get_main_state();
|
||||
lua::stackguard guard(L);
|
||||
lua::requireglobal(L, STDCOMP);
|
||||
if (lua::getfield(L, "new_Entity")) {
|
||||
lua::pushinteger(L, eid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue