diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-12-21 12:55:23 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2017-12-21 12:55:23 +0100 |
commit | e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5 (patch) | |
tree | 8db91d5816a618374777af363f57db09b1a19361 /src/Inventory.cpp | |
parent | Fixed Clang 5.0 compile errors (#4085) (diff) | |
download | cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.tar cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.tar.gz cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.tar.bz2 cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.tar.lz cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.tar.xz cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.tar.zst cuberite-e0ff5f56398bf2135e9d6144b17eb4e544fdd3d5.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 ad356d3ae..c7b1e4f28 100644 --- a/src/Inventory.cpp +++ b/src/Inventory.cpp @@ -28,6 +28,7 @@ cInventory::cInventory(cPlayer & a_Owner) : m_ArmorSlots.AddListener(*this); m_InventorySlots.AddListener(*this); m_HotbarSlots.AddListener(*this); + m_ShieldSlots.AddListener(*this); SetEquippedSlotNum(0); } @@ -792,6 +793,11 @@ void cInventory::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) { Base = invHotbarOffset; } + else if (a_ItemGrid = &m_ShieldSlots) + { + Base = invShieldOffset; + + } else { ASSERT(!"Unknown ItemGrid calling OnSlotChanged()"); |