mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Send Inventory packet on event, don't check it at each AsyncRunStep.
* Call UpdateCrafting into SendInventory because this functions is only called before SendInventory * Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id * m_env_mutex don't need to be used with this modification because it's already locked before the calls
This commit is contained in:
@@ -1390,7 +1390,9 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
|
||||
// Placement was handled in lua
|
||||
|
||||
// Apply returned ItemStack
|
||||
playersao->setWieldedItem(item);
|
||||
if (playersao->setWieldedItem(item)) {
|
||||
SendInventory(pkt->getPeerId());
|
||||
}
|
||||
}
|
||||
|
||||
// If item has node placement prediction, always send the
|
||||
|
Reference in New Issue
Block a user