From 741df993ff33832d773536ed571c1a67ed93b5cb Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Thu, 2 Oct 2014 15:58:13 -0400 Subject: Fix object reference pushing functions when called from coroutines --- src/script/lua_api/l_env.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/script/lua_api') 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; -- cgit v1.2.3