summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cChunk.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 4e32b4dad..6295d4bba 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -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);