diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-08-24 19:07:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-24 19:07:38 +0200 |
commit | 0b4f424f414380b7a46270e1389e8aa0524d8fba (patch) | |
tree | 5731cbe72bb3178d697b3cda43b838f26ba34f7d /src/script/lua_api/l_object.cpp | |
parent | 008b80fe1ca9d46610b8971e2ac92fb56da8e69f (diff) | |
download | minetest-0b4f424f414380b7a46270e1389e8aa0524d8fba.tar.gz minetest-0b4f424f414380b7a46270e1389e8aa0524d8fba.tar.bz2 minetest-0b4f424f414380b7a46270e1389e8aa0524d8fba.zip |
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.
Diffstat (limited to 'src/script/lua_api/l_object.cpp')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 2 |
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 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; |