1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00
This commit is contained in:
ZenonSeth 2025-09-30 11:38:31 -07:00 committed by GitHub
commit 3bc998587e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 169 additions and 2 deletions

View file

@ -740,6 +740,14 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt)
if (!check_inv_access(ca->craft_inv))
return;
}
/*
Handle HotbarSlotSelected action special cases
*/
else if (a->getType() == IAction::HotbarSlotSelected) {
IHotbarSlotSelectedAction *ha = (IHotbarSlotSelectedAction*)a.get();
ha->inv.applyCurrentPlayer(player->getName());
// Note: `IHotbarSlotSelectedAction::clientApply` is empty, thus nothing to revert.
} else {
// Unknown action. Ignored.
return;