Merge pull request #294 from tonibm19/patch-3
Correct wool drops when shearing a sheep.
This commit is contained in:
commit
65b43604a5
@ -33,6 +33,7 @@ void cSheep::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
|
||||
|
||||
|
||||
|
||||
void cSheep::OnRightClicked(cPlayer & a_Player)
|
||||
{
|
||||
if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_SHEARS) && (!m_IsSheared))
|
||||
@ -46,7 +47,8 @@ void cSheep::OnRightClicked(cPlayer & a_Player)
|
||||
}
|
||||
|
||||
cItems Drops;
|
||||
Drops.push_back(cItem(E_BLOCK_WOOL, 4, m_WoolColor));
|
||||
int NumDrops = m_World->GetTickRandomNumber(2) + 1;
|
||||
Drops.push_back(cItem(E_BLOCK_WOOL, NumDrops, m_WoolColor));
|
||||
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
|
||||
}
|
||||
}
|
||||
@ -54,3 +56,4 @@ void cSheep::OnRightClicked(cPlayer & a_Player)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user