summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-23 14:57:26 +0100
committerSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-23 14:57:26 +0100
commit1ccf7d9c8a6321fa215ec17ec48b7f9111d31080 (patch)
tree1716e4d3b887282702160986bd69b4df3f29a98c /src/Mobs
parentBaby chickens don't lay eggs (diff)
downloadcuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.tar
cuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.tar.gz
cuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.tar.bz2
cuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.tar.lz
cuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.tar.xz
cuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.tar.zst
cuberite-1ccf7d9c8a6321fa215ec17ec48b7f9111d31080.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Chicken.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index d29b38cb3..5393a8a35 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -24,26 +24,28 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
- if (!IsBaby())
+ if (IsBaby())
{
- if ((m_EggDropTimer == 6000) && (m_World->GetTickRandomNumber(1) == 0))
- {
- cItems Drops;
- m_EggDropTimer = 0;
- Drops.push_back(cItem(E_ITEM_EGG, 1));
- m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
- }
- else if (m_EggDropTimer == 12000)
- {
- cItems Drops;
- m_EggDropTimer = 0;
- Drops.push_back(cItem(E_ITEM_EGG, 1));
- m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
- }
- else
- {
- m_EggDropTimer++;
- }
+ return; // Babies don't lay eggs
+ }
+
+ if ((m_EggDropTimer == 6000) && (m_World->GetTickRandomNumber(1) == 0))
+ {
+ cItems Drops;
+ m_EggDropTimer = 0;
+ Drops.push_back(cItem(E_ITEM_EGG, 1));
+ m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
+ }
+ else if (m_EggDropTimer == 12000)
+ {
+ cItems Drops;
+ m_EggDropTimer = 0;
+ Drops.push_back(cItem(E_ITEM_EGG, 1));
+ m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
+ }
+ else
+ {
+ m_EggDropTimer++;
}
}