Fixed FS #243, server crash after restart. The blockhandler table and the itemhandler table weren't properly re-initialized.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@830 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -580,15 +580,22 @@ void cChunk::TickBlocks(MTRand & a_TickRandom)
|
||||
|
||||
default:
|
||||
{
|
||||
cBlockHandler *Handler = BlockHandler(ID);
|
||||
if(Handler->NeedsRandomTicks())
|
||||
Handler->OnUpdate(m_World, m_BlockTickX + m_PosX*Width, m_BlockTickY, m_BlockTickZ + m_PosZ*Width);
|
||||
cBlockHandler * Handler = BlockHandler(ID);
|
||||
ASSERT(Handler != NULL); // Happenned on server restart, FS #243
|
||||
if (Handler->NeedsRandomTicks())
|
||||
{
|
||||
Handler->OnUpdate(m_World, m_BlockTickX + m_PosX * Width, m_BlockTickY, m_BlockTickZ + m_PosZ * Width);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cChunk::TickMelonPumpkin(int a_RelX, int a_RelY, int a_RelZ, int a_BlockIdx, BLOCKTYPE a_BlockType, MTRand & a_TickRandom)
|
||||
{
|
||||
NIBBLETYPE Meta = GetMeta(a_BlockIdx);
|
||||
|
||||
Reference in New Issue
Block a user