diff options
Diffstat (limited to 'src/network/serverpackethandler.cpp')
-rw-r--r-- | src/network/serverpackethandler.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 1965d87aa..6cb3b3520 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -313,7 +313,7 @@ void Server::handleCommand_Init2(NetworkPacket* pkt) sendMediaAnnouncement(pkt->getPeerId(), lang); // Send detached inventories - sendDetachedInventories(pkt->getPeerId()); + sendDetachedInventories(pkt->getPeerId(), false); // Send time of day u16 time = m_env->getTimeOfDay(); @@ -608,10 +608,9 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) ma->from_inv.applyCurrentPlayer(player->getName()); ma->to_inv.applyCurrentPlayer(player->getName()); - setInventoryModified(ma->from_inv, false); - if (ma->from_inv != ma->to_inv) { - setInventoryModified(ma->to_inv, false); - } + setInventoryModified(ma->from_inv); + if (ma->from_inv != ma->to_inv) + setInventoryModified(ma->to_inv); bool from_inv_is_current_player = (ma->from_inv.type == InventoryLocation::PLAYER) && @@ -676,7 +675,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) da->from_inv.applyCurrentPlayer(player->getName()); - setInventoryModified(da->from_inv, false); + setInventoryModified(da->from_inv); /* Disable dropping items out of craftpreview @@ -712,7 +711,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) ca->craft_inv.applyCurrentPlayer(player->getName()); - setInventoryModified(ca->craft_inv, false); + setInventoryModified(ca->craft_inv); //bool craft_inv_is_current_player = // (ca->craft_inv.type == InventoryLocation::PLAYER) && @@ -731,8 +730,6 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) a->apply(this, playersao, this); // Eat the action delete a; - - SendInventory(playersao, true); } void Server::handleCommand_ChatMessage(NetworkPacket* pkt) |