Did some static analysis, fixed some bugs and optimized a lot of code
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user