1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-01 23:25:09 +02:00

fix armor not equipping from right click

This commit is contained in:
p2r3
2025-09-10 20:11:59 +03:00
parent 55da6c7d4c
commit e4c0c6b6e9

View File

@@ -1151,7 +1151,7 @@ void handlePlayerUseItem (PlayerData *player, short x, short y, short z, uint8_t
} else if (getItemDefensePoints(*item) != 0) {
// For some reason, this action is sent twice when looking at a block
// Ignore the variant that has coordinates
if (face == 255) return;
if (face != 255) return;
// Swap to held piece of armor
uint8_t slot = getArmorItemSlot(*item);
uint16_t prev_item = player->inventory_items[slot];