Unified the way mobs are spawned (egg vs natural). Fixed deadlocks in mob moving. Fixed mob destroying code.
Should fix FS #400 and partially fix FS #381 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1626 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -93,7 +93,7 @@ void cPickup::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
m_Timer += a_Dt; // In case we have to destroy the pickup in the same tick.
|
||||
if (m_Timer > 500.f)
|
||||
{
|
||||
Destroy();
|
||||
Destroy(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -104,20 +104,20 @@ void cPickup::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
if (m_Timer > 500.f) // 0.5 second
|
||||
{
|
||||
Destroy();
|
||||
Destroy(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Timer > 1000 * 60 * 5) // 5 minutes
|
||||
{
|
||||
Destroy();
|
||||
Destroy(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetPosY() < -8) // Out of this world and no more visible!
|
||||
{
|
||||
Destroy();
|
||||
Destroy(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user