From 0b4f424f414380b7a46270e1389e8aa0524d8fba Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 24 Aug 2019 19:07:38 +0200 Subject: Inventory: Send dirty lists where appropriate (#8742) This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code. --- 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 be2172f1b..68cc1c0a9 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -355,7 +355,7 @@ int ObjectRef::l_set_wielded_item(lua_State *L) ItemStack item = read_item(L, 2, getServer(L)->idef()); bool success = co->setWieldedItem(item); if (success && co->getType() == ACTIVEOBJECT_TYPE_PLAYER) { - getServer(L)->SendInventory(((PlayerSAO*)co)); + getServer(L)->SendInventory((PlayerSAO *)co, true); } lua_pushboolean(L, success); return 1; -- cgit v1.2.3