aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-04 15:27:53 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-04 15:28:33 +0100
commit7e088fdfe3c77083606bce955624aef1da59bb32 (patch)
tree00d427e45bbcac528b4aa86b3060c09454cb08cc /src/script
parentbbed01ab62bf2433e103dd18c6c07ff3f503bc57 (diff)
downloadminetest-7e088fdfe3c77083606bce955624aef1da59bb32.tar.gz
minetest-7e088fdfe3c77083606bce955624aef1da59bb32.tar.bz2
minetest-7e088fdfe3c77083606bce955624aef1da59bb32.zip
We always know playerSAO when calling SendInventory. Using it instead of searching it via peer_id
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_object.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 0f3848aac..d8cfaf82b 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -356,7 +356,7 @@ int ObjectRef::l_set_wielded_item(lua_State *L)
ItemStack item = read_item(L, 2, getServer(L));
bool success = co->setWieldedItem(item);
if (success && co->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
- getServer(L)->SendInventory(((PlayerSAO*)co)->getPeerID());
+ getServer(L)->SendInventory(((PlayerSAO*)co));
}
lua_pushboolean(L, success);
return 1;