summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Squid.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-28 13:29:26 +0200
committertycho <work.tycho@gmail.com>2015-05-28 13:54:04 +0200
commitb2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0 (patch)
treeff9846d0ffa558e237ea148762f67b5ebf71a47d /src/Mobs/Squid.cpp
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.gz
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.bz2
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.lz
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.xz
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.tar.zst
cuberite-b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0.zip
Diffstat (limited to 'src/Mobs/Squid.cpp')
-rw-r--r--src/Mobs/Squid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp
index 7928f7dc8..d148d65f3 100644
--- a/src/Mobs/Squid.cpp
+++ b/src/Mobs/Squid.cpp
@@ -41,13 +41,13 @@ void cSquid::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
Vector3d Pos = GetPosition();
// TODO: Not a real behavior, but cool :D
- int RelY = static_cast<int>(floor(Pos.y));
+ int RelY = FloorC(Pos.y);
if ((RelY < 0) || (RelY >= cChunkDef::Height))
{
return;
}
- int RelX = static_cast<int>(floor(Pos.x)) - a_Chunk.GetPosX() * cChunkDef::Width;
- int RelZ = static_cast<int>(floor(Pos.z)) - a_Chunk.GetPosZ() * cChunkDef::Width;
+ int RelX = FloorC(Pos.x) - a_Chunk.GetPosX() * cChunkDef::Width;
+ int RelZ = FloorC(Pos.z) - a_Chunk.GetPosZ() * cChunkDef::Width;
BLOCKTYPE BlockType;
if (a_Chunk.UnboundedRelGetBlockType(RelX, RelY, RelZ, BlockType) && !IsBlockWater(BlockType) && !IsOnFire())
{