Chicken egg code early bailout
This commit is contained in:
parent
fd2edf3ecf
commit
1ccf7d9c8a
@ -24,8 +24,11 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
super::Tick(a_Dt, a_Chunk);
|
||||
|
||||
if (!IsBaby())
|
||||
if (IsBaby())
|
||||
{
|
||||
return; // Babies don't lay eggs
|
||||
}
|
||||
|
||||
if ((m_EggDropTimer == 6000) && (m_World->GetTickRandomNumber(1) == 0))
|
||||
{
|
||||
cItems Drops;
|
||||
@ -45,7 +48,6 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
||||
m_EggDropTimer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user