From f48d43f050683488b4cdbddcc92cfc7804112c11 Mon Sep 17 00:00:00 2001 From: jfhumann Date: Sat, 19 Apr 2014 20:51:52 +0200 Subject: Fixed Flint and Steel, reverted Minecart change, renamed a parameter name --- src/BlockEntities/DispenserEntity.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/BlockEntities/DispenserEntity.cpp') diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index f5b9c8923..2a32f69d9 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -128,11 +128,11 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) if (DispChunk->GetBlock(DispX, DispY, DispZ) == E_BLOCK_AIR) { DispChunk->SetBlock(DispX, DispY, DispZ, E_BLOCK_FIRE, 0); - const cItem& slot = m_Contents.GetSlot(a_SlotNum); - m_Contents.SetSlot(a_SlotNum, slot.m_ItemType, slot.m_ItemCount, slot.m_ItemDamage + 1); - // If the durability has run out destroy the item. - if (m_Contents.GetSlot(a_SlotNum).m_ItemDamage > 64) - { + + bool ItemBroke = m_Contents.DamageItem(a_SlotNum, 1); + + if (ItemBroke) + { m_Contents.ChangeSlotCount(a_SlotNum, -1); } } -- cgit v1.2.3