summaryrefslogtreecommitdiffstats
path: root/src/Mobs/SnowGolem.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-22 21:12:34 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-22 21:12:34 +0100
commit5af74fe77c78a0b084d2b8e528610adfdf538be3 (patch)
treea3e75bac7659321ca9758d6bb2178622eda8889a /src/Mobs/SnowGolem.cpp
parentSnow golems die in hot biomes and leave a snow trail. (diff)
downloadcuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.tar
cuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.tar.gz
cuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.tar.bz2
cuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.tar.lz
cuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.tar.xz
cuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.tar.zst
cuberite-5af74fe77c78a0b084d2b8e528610adfdf538be3.zip
Diffstat (limited to 'src/Mobs/SnowGolem.cpp')
-rw-r--r--src/Mobs/SnowGolem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp
index e16b526ad..06021cca5 100644
--- a/src/Mobs/SnowGolem.cpp
+++ b/src/Mobs/SnowGolem.cpp
@@ -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);
}