summaryrefslogtreecommitdiffstats
path: root/src/Mobs/SnowGolem.cpp
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2015-07-29 17:04:03 +0200
committerSamuel Barney <samjbarney@gmail.com>2015-07-29 17:49:30 +0200
commit804805d35a87c2acc9425d1762ad26b1ba2ec9ac (patch)
tree13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Mobs/SnowGolem.cpp
parentMerge pull request #2376 from mjhanninen/fix-freebsd-build (diff)
downloadcuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.gz
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.bz2
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.lz
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.xz
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.zst
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.zip
Diffstat (limited to 'src/Mobs/SnowGolem.cpp')
-rw-r--r--src/Mobs/SnowGolem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp
index e1510b203..6afe3fda0 100644
--- a/src/Mobs/SnowGolem.cpp
+++ b/src/Mobs/SnowGolem.cpp
@@ -30,17 +30,17 @@ void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSnowGolem::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
- if (IsBiomeNoDownfall(m_World->GetBiomeAt((int) floor(GetPosX()), (int) floor(GetPosZ()))))
+ if (IsBiomeNoDownfall(m_World->GetBiomeAt(POSX_TOINT, POSZ_TOINT)))
{
TakeDamage(*this);
}
else
{
- 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()));
+ BLOCKTYPE BlockBelow = m_World->GetBlock(POSX_TOINT, POSY_TOINT - 1, POSZ_TOINT);
+ BLOCKTYPE Block = m_World->GetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT);
if ((Block == E_BLOCK_AIR) && cBlockInfo::IsSolid(BlockBelow))
{
- m_World->SetBlock((int) floor(GetPosX()), (int) floor(GetPosY()), (int) floor(GetPosZ()), E_BLOCK_SNOW, 0);
+ m_World->SetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT, E_BLOCK_SNOW, 0);
}
}
}