1
0

Simulator: fixed a problem when manipulating the bedrock layer

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1295 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-03-22 14:54:08 +00:00
parent 39e4bd3239
commit 18343674b3

View File

@ -32,12 +32,18 @@ cSimulator::~cSimulator()
void cSimulator::WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
{
AddBlock(a_BlockX, a_BlockY, a_BlockZ, a_Chunk);
AddBlock(a_BlockX, a_BlockY - 1, a_BlockZ, a_Chunk);
AddBlock(a_BlockX, a_BlockY + 1, a_BlockZ, a_Chunk);
AddBlock(a_BlockX - 1, a_BlockY, a_BlockZ, a_Chunk->GetNeighborChunk(a_BlockX - 1, a_BlockZ));
AddBlock(a_BlockX + 1, a_BlockY, a_BlockZ, a_Chunk->GetNeighborChunk(a_BlockX + 1, a_BlockZ));
AddBlock(a_BlockX, a_BlockY, a_BlockZ - 1, a_Chunk->GetNeighborChunk(a_BlockX, a_BlockZ - 1));
AddBlock(a_BlockX, a_BlockY, a_BlockZ + 1, a_Chunk->GetNeighborChunk(a_BlockX, a_BlockZ + 1));
if (a_BlockY > 0)
{
AddBlock(a_BlockX, a_BlockY - 1, a_BlockZ, a_Chunk);
}
if (a_BlockY < cChunkDef::Height - 1)
{
AddBlock(a_BlockX, a_BlockY + 1, a_BlockZ, a_Chunk);
}
}