summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Squid.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-24 13:56:56 +0200
committertycho <work.tycho@gmail.com>2015-05-24 13:56:56 +0200
commitdae9e5792a4f030ae9e748548a16a89790fbd311 (patch)
tree2142b8c4deb9f2c7ad096b8b0ec93fefccd8d8f1 /src/Mobs/Squid.cpp
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.gz
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.bz2
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.lz
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.xz
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.zst
cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.zip
Diffstat (limited to '')
-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 9affcd6e1..7928f7dc8 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 = (int)floor(Pos.y);
+ int RelY = static_cast<int>(floor(Pos.y));
if ((RelY < 0) || (RelY >= cChunkDef::Height))
{
return;
}
- int RelX = (int)floor(Pos.x) - a_Chunk.GetPosX() * cChunkDef::Width;
- int RelZ = (int)floor(Pos.z) - a_Chunk.GetPosZ() * cChunkDef::Width;
+ 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;
BLOCKTYPE BlockType;
if (a_Chunk.UnboundedRelGetBlockType(RelX, RelY, RelZ, BlockType) && !IsBlockWater(BlockType) && !IsOnFire())
{