1
0
Fork 0

Fixed bug where snowgolems could replace non-solid blocks to snow blocks.

This commit is contained in:
STRWarrior 2013-12-22 21:12:34 +01:00
parent 5a9b26d322
commit 5af74fe77c
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ void cSnowGolem::Tick(float a_Dt, cChunk & a_Chunk)
}
else
{
if (g_BlockIsSolid[m_World->GetBlock((int) floor(GetPosX()), (int) floor(GetPosY()) - 1, (int) floor(GetPosZ()))])
BLOCKTYPE BlockBelow = m_World->GetBlock((int) floor(GetPosX()), (int) floor(GetPosY()) - 1, (int) floor(GetPosZ()));
BLOCKTYPE Block = m_World->GetBlock((int) floor(GetPosX()), (int) floor(GetPosY()), (int) floor(GetPosZ()));
if (Block == E_BLOCK_AIR && g_BlockIsSolid[BlockBelow])
{
m_World->SetBlock((int) floor(GetPosX()), (int) floor(GetPosY()), (int) floor(GetPosZ()), E_BLOCK_SNOW, 0);
}