diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-10-02 15:58:13 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-10-07 16:37:45 -0400 |
commit | 741df993ff33832d773536ed571c1a67ed93b5cb (patch) | |
tree | 1e6e3379873ce00df92a1c53d1e403e767b21a32 /src/script/lua_api | |
parent | 28438bba27168289be59a26d3ae55e3f3658d8d3 (diff) | |
download | minetest-741df993ff33832d773536ed571c1a67ed93b5cb.tar.gz minetest-741df993ff33832d773536ed571c1a67ed93b5cb.tar.bz2 minetest-741df993ff33832d773536ed571c1a67ed93b5cb.zip |
Fix object reference pushing functions when called from coroutines
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_env.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index fedaccd0f..7c7a68b7e 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -375,7 +375,7 @@ int ModApiEnvMod::l_add_entity(lua_State *L) if(objectid == 0) return 0; // Return ObjectRef - getScriptApiBase(L)->objectrefGetOrCreate(obj); + getScriptApiBase(L)->objectrefGetOrCreate(L, obj); return 1; } @@ -440,7 +440,7 @@ int ModApiEnvMod::l_get_player_by_name(lua_State *L) return 1; } // Put player on stack - getScriptApiBase(L)->objectrefGetOrCreate(sao); + getScriptApiBase(L)->objectrefGetOrCreate(L, sao); return 1; } @@ -459,7 +459,7 @@ int ModApiEnvMod::l_get_objects_inside_radius(lua_State *L) for(u32 i = 0; iter != ids.end(); iter++) { ServerActiveObject *obj = env->getActiveObject(*iter); // Insert object reference into table - script->objectrefGetOrCreate(obj); + script->objectrefGetOrCreate(L, obj); lua_rawseti(L, -2, ++i); } return 1; |