Simulators don't simulate in invalid chunks (valgrind error)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1676 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
168c760b06
commit
889402a56a
@ -86,7 +86,7 @@ void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a_Chunk == NULL)
|
if ((a_Chunk == NULL) || !a_Chunk->IsValid())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ bool cFireSimulator::IsForever(BLOCKTYPE a_BlockType)
|
|||||||
|
|
||||||
void cFireSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
|
void cFireSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
|
||||||
{
|
{
|
||||||
if (a_Chunk == NULL)
|
if ((a_Chunk == NULL) || !a_Chunk->IsValid())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ bool cSandSimulator::IsAllowedBlock(BLOCKTYPE a_BlockType)
|
|||||||
|
|
||||||
void cSandSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
|
void cSandSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
|
||||||
{
|
{
|
||||||
if (a_Chunk == NULL)
|
if ((a_Chunk == NULL) || !a_Chunk->IsValid())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user