aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_nodemeta.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-10-02 15:58:13 -0400
committerShadowNinja <shadowninja@minetest.net>2014-10-07 16:37:45 -0400
commit741df993ff33832d773536ed571c1a67ed93b5cb (patch)
tree1e6e3379873ce00df92a1c53d1e403e767b21a32 /src/script/cpp_api/s_nodemeta.cpp
parent28438bba27168289be59a26d3ae55e3f3658d8d3 (diff)
downloaddragonfireclient-741df993ff33832d773536ed571c1a67ed93b5cb.tar.xz
Fix object reference pushing functions when called from coroutines
Diffstat (limited to 'src/script/cpp_api/s_nodemeta.cpp')
-rw-r--r--src/script/cpp_api/s_nodemeta.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/cpp_api/s_nodemeta.cpp b/src/script/cpp_api/s_nodemeta.cpp
index bf6a4f73b..01eee337c 100644
--- a/src/script/cpp_api/s_nodemeta.cpp
+++ b/src/script/cpp_api/s_nodemeta.cpp
@@ -53,7 +53,7 @@ int ScriptApiNodemeta::nodemeta_inventory_AllowMove(v3s16 p,
lua_pushstring(L, to_list.c_str()); // to_list
lua_pushinteger(L, to_index + 1); // to_index
lua_pushinteger(L, count); // count
- objectrefGetOrCreate(player); // player
+ objectrefGetOrCreate(L, player); // player
if (lua_pcall(L, 7, 1, m_errorhandler))
scriptError();
if (!lua_isnumber(L, -1))
@@ -88,7 +88,7 @@ int ScriptApiNodemeta::nodemeta_inventory_AllowPut(v3s16 p,
lua_pushstring(L, listname.c_str()); // listname
lua_pushinteger(L, index + 1); // index
LuaItemStack::create(L, stack); // stack
- objectrefGetOrCreate(player); // player
+ objectrefGetOrCreate(L, player); // player
if (lua_pcall(L, 5, 1, m_errorhandler))
scriptError();
if(!lua_isnumber(L, -1))
@@ -123,7 +123,7 @@ int ScriptApiNodemeta::nodemeta_inventory_AllowTake(v3s16 p,
lua_pushstring(L, listname.c_str()); // listname
lua_pushinteger(L, index + 1); // index
LuaItemStack::create(L, stack); // stack
- objectrefGetOrCreate(player); // player
+ objectrefGetOrCreate(L, player); // player
if (lua_pcall(L, 5, 1, m_errorhandler))
scriptError();
if (!lua_isnumber(L, -1))
@@ -161,7 +161,7 @@ void ScriptApiNodemeta::nodemeta_inventory_OnMove(v3s16 p,
lua_pushstring(L, to_list.c_str()); // to_list
lua_pushinteger(L, to_index + 1); // to_index
lua_pushinteger(L, count); // count
- objectrefGetOrCreate(player); // player
+ objectrefGetOrCreate(L, player); // player
if (lua_pcall(L, 7, 0, m_errorhandler))
scriptError();
}
@@ -190,7 +190,7 @@ void ScriptApiNodemeta::nodemeta_inventory_OnPut(v3s16 p,
lua_pushstring(L, listname.c_str()); // listname
lua_pushinteger(L, index + 1); // index
LuaItemStack::create(L, stack); // stack
- objectrefGetOrCreate(player); // player
+ objectrefGetOrCreate(L, player); // player
if (lua_pcall(L, 5, 0, m_errorhandler))
scriptError();
}
@@ -219,7 +219,7 @@ void ScriptApiNodemeta::nodemeta_inventory_OnTake(v3s16 p,
lua_pushstring(L, listname.c_str()); // listname
lua_pushinteger(L, index + 1); // index
LuaItemStack::create(L, stack); // stack
- objectrefGetOrCreate(player); // player
+ objectrefGetOrCreate(L, player); // player
if (lua_pcall(L, 5, 0, m_errorhandler))
scriptError();
}