summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-12-21 12:55:23 +0100
committerAlexander Harkness <me@bearbin.net>2017-12-21 12:55:23 +0100
commite0ff5f56398bf2135e9d6144b17eb4e544fdd3d5 (patch)
tree8db91d5816a618374777af363f57db09b1a19361 /src
parentFixed Clang 5.0 compile errors (#4085) (diff)
downloadcuberite-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')
-rw-r--r--src/Inventory.cpp6
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()");