summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Chicken.cpp
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-12-16 17:45:07 +0100
committerSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-23 14:54:07 +0100
commitfd2edf3ecf69ecf40fd4a4734cb493bc157a38a4 (patch)
treeff27f5d1868c12233fe3e626ed3d04dff911ba64 /src/Mobs/Chicken.cpp
parentMerge pull request #2796 from cuberite/MojangCert (diff)
downloadcuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.tar
cuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.tar.gz
cuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.tar.bz2
cuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.tar.lz
cuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.tar.xz
cuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.tar.zst
cuberite-fd2edf3ecf69ecf40fd4a4734cb493bc157a38a4.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Chicken.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index c6042e420..d29b38cb3 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -24,23 +24,26 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
- if ((m_EggDropTimer == 6000) && (m_World->GetTickRandomNumber(1) == 0))
+ if (!IsBaby())
{
- 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++;
+ 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++;
+ }
}
}