diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/clientpackethandler.cpp | 2 | ||||
-rw-r--r-- | src/network/networkprotocol.h | 5 | ||||
-rw-r--r-- | src/network/serverpackethandler.cpp | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 520fcfa81..91829474e 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -333,7 +333,7 @@ void Client::handleCommand_Inventory(NetworkPacket* pkt) player->inventory.deSerialize(is); - m_inventory_updated = true; + m_update_wielded_item = true; delete m_inventory_from_server; m_inventory_from_server = new Inventory(player->inventory); diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 451518bbf..05737d0a9 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -195,9 +195,12 @@ with this program; if not, write to the Free Software Foundation, Inc., ContentFeatures version 13 Add full Euler rotations instead of just yaw Add TOCLIENT_PLAYER_SPEED + PROTOCOL VERSION 38: + Incremental inventory sending mode + Unknown inventory serialization fields no longer throw an error */ -#define LATEST_PROTOCOL_VERSION 37 +#define LATEST_PROTOCOL_VERSION 38 #define LATEST_PROTOCOL_VERSION_STRING TOSTRING(LATEST_PROTOCOL_VERSION) // Server's supported network protocol range diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 5ad60f48a..1965d87aa 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -732,7 +732,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) // Eat the action delete a; - SendInventory(playersao); + SendInventory(playersao, true); } void Server::handleCommand_ChatMessage(NetworkPacket* pkt) @@ -1310,7 +1310,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt) // Apply returned ItemStack if (playersao->setWieldedItem(item)) { - SendInventory(playersao); + SendInventory(playersao, true); } } @@ -1346,7 +1346,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt) item, playersao, pointed)) { // Apply returned ItemStack if (playersao->setWieldedItem(item)) { - SendInventory(playersao); + SendInventory(playersao, true); } } @@ -1364,7 +1364,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt) if (m_script->item_OnSecondaryUse( item, playersao)) { if( playersao->setWieldedItem(item)) { - SendInventory(playersao); + SendInventory(playersao, true); } } } // action == INTERACT_ACTIVATE |