summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-24 18:47:15 +0200
committertycho <work.tycho@gmail.com>2015-05-24 18:47:15 +0200
commitd1c91223401f7d13d6f32471da36db77360678b6 (patch)
tree0e5e39efbd8d96c0bcd35235b58aa07e4ab58e09 /src
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-d1c91223401f7d13d6f32471da36db77360678b6.tar
cuberite-d1c91223401f7d13d6f32471da36db77360678b6.tar.gz
cuberite-d1c91223401f7d13d6f32471da36db77360678b6.tar.bz2
cuberite-d1c91223401f7d13d6f32471da36db77360678b6.tar.lz
cuberite-d1c91223401f7d13d6f32471da36db77360678b6.tar.xz
cuberite-d1c91223401f7d13d6f32471da36db77360678b6.tar.zst
cuberite-d1c91223401f7d13d6f32471da36db77360678b6.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Path.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp
index 6f3d43305..4d04d9861 100644
--- a/src/Mobs/Path.cpp
+++ b/src/Mobs/Path.cpp
@@ -46,18 +46,18 @@ cPath::cPath(
a_BoundingBoxWidth = 1; // Until we improve physics, if ever.
- m_BoundingBoxWidth = ceil(a_BoundingBoxWidth);
- m_BoundingBoxHeight = ceil(a_BoundingBoxHeight);
+ m_BoundingBoxWidth = static_cast<int>(ceil(a_BoundingBoxWidth));
+ m_BoundingBoxHeight = static_cast<int>(ceil(a_BoundingBoxHeight));
m_HalfWidth = a_BoundingBoxWidth / 2;
- int HalfWidthInt = a_BoundingBoxWidth / 2;
- m_Source.x = floor(a_StartingPoint.x - HalfWidthInt);
- m_Source.y = floor(a_StartingPoint.y);
- m_Source.z = floor(a_StartingPoint.z - HalfWidthInt);
+ int HalfWidthInt = static_cast<int>(a_BoundingBoxWidth / 2);
+ m_Source.x = static_cast<int>(floor(a_StartingPoint.x - HalfWidthInt));
+ m_Source.y = static_cast<int>(floor(a_StartingPoint.y));
+ m_Source.z = static_cast<int>(floor(a_StartingPoint.z - HalfWidthInt));
- m_Destination.x = floor(a_EndingPoint.x - HalfWidthInt);
- m_Destination.y = floor(a_EndingPoint.y);
- m_Destination.z = floor(a_EndingPoint.z - HalfWidthInt);
+ m_Destination.x = static_cast<int>(floor(a_EndingPoint.x - HalfWidthInt));
+ m_Destination.y = static_cast<int>(floor(a_EndingPoint.y));
+ m_Destination.z = static_cast<int>(floor(a_EndingPoint.z - HalfWidthInt));
if (GetCell(m_Source)->m_IsSolid || GetCell(m_Destination)->m_IsSolid)
{