diff options
author | Mattes D <github@xoft.cz> | 2013-10-28 19:51:46 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-10-28 19:51:46 +0100 |
commit | 65b43604a5b373bbf07322ad0be87c8806d1a457 (patch) | |
tree | 9a21b3541826f8e7a3721c4b63832975e1ede691 /source/Mobs | |
parent | Debuggers: Fixed after the cWindow API change. (diff) | |
parent | Fixed compilation (diff) | |
download | cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.tar cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.tar.gz cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.tar.bz2 cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.tar.lz cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.tar.xz cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.tar.zst cuberite-65b43604a5b373bbf07322ad0be87c8806d1a457.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Mobs/Sheep.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/Mobs/Sheep.cpp b/source/Mobs/Sheep.cpp index 0d7d43e27..5a3b2d015 100644 --- a/source/Mobs/Sheep.cpp +++ b/source/Mobs/Sheep.cpp @@ -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,11 +47,13 @@ void cSheep::OnRightClicked(cPlayer & a_Player) } cItems Drops; - Drops.push_back(cItem(E_BLOCK_WOOL, 4, m_WoolColor)); - m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10); + 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); } } + |