From 7e088fdfe3c77083606bce955624aef1da59bb32 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 4 Mar 2015 15:27:53 +0100 Subject: We always know playerSAO when calling SendInventory. Using it instead of searching it via peer_id --- src/script/lua_api/l_object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/lua_api') 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; -- cgit v1.2.3