1
0

Did some static analysis, fixed some bugs and optimized a lot of code

This commit is contained in:
jfhumann
2014-04-18 21:09:44 +02:00
parent 449afa850e
commit 013da806ec
48 changed files with 257 additions and 212 deletions

View File

@@ -128,7 +128,8 @@ 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);
m_Contents.SetSlot(a_SlotNum, m_Contents.GetSlot(a_SlotNum).m_ItemType, m_Contents.GetSlot(a_SlotNum).m_ItemCount, m_Contents.GetSlot(a_SlotNum).m_ItemDamage + 1);
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)
{