1
0

allow use failures to propagate from the entity/block to the player

This commit is contained in:
Gargaj
2015-12-01 23:12:44 +01:00
parent e7fd308ffa
commit f9008a4860
55 changed files with 120 additions and 77 deletions

View File

@@ -22,11 +22,11 @@ cFlowerPotEntity::cFlowerPotEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWo
// It don't do anything when 'used'
void cFlowerPotEntity::UsedBy(cPlayer * a_Player)
bool cFlowerPotEntity::UsedBy(cPlayer * a_Player)
{
if (IsItemInPot())
{
return;
return false;
}
cItem SelectedItem = a_Player->GetInventory().GetEquippedItem();
@@ -39,6 +39,7 @@ void cFlowerPotEntity::UsedBy(cPlayer * a_Player)
}
m_World->BroadcastBlockEntity(m_PosX, m_PosY, m_PosZ, a_Player->GetClientHandle());
}
return true;
}