diff options
author | Mattes D <github@xoft.cz> | 2014-03-07 14:45:45 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-07 14:45:45 +0100 |
commit | c1977035cfa6be57d50ec58aee7b5abe10b79ae7 (patch) | |
tree | 247b57eb23e423f934389190f17b44fdb261b99c /src/Inventory.cpp | |
parent | Rewound PolarSSL to master branch. (diff) | |
parent | Fix comment (diff) | |
download | cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.tar cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.tar.gz cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.tar.bz2 cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.tar.lz cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.tar.xz cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.tar.zst cuberite-c1977035cfa6be57d50ec58aee7b5abe10b79ae7.zip |
Diffstat (limited to 'src/Inventory.cpp')
-rw-r--r-- | src/Inventory.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Inventory.cpp b/src/Inventory.cpp index 7f434adfd..c7c089d5f 100644 --- a/src/Inventory.cpp +++ b/src/Inventory.cpp @@ -204,6 +204,12 @@ void cInventory::SetSlot(int a_SlotNum, const cItem & a_Item) return; } Grid->SetSlot(GridSlotNum, a_Item); + + // Broadcast the Equipped Item, if the Slot is changed. + if ((Grid == &m_HotbarSlots) && (m_EquippedSlotNum == (a_SlotNum - invHotbarOffset))) + { + m_Owner.GetWorld()->BroadcastEntityEquipment(m_Owner, 0, a_Item, m_Owner.GetClientHandle()); + } } |