summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Path.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
commit1e6f02437e88495d57249f742526526ee5865777 (patch)
treeaf200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/Mobs/Path.cpp
parentMerge pull request #2157 from beeduck/Issue2106 (diff)
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-1e6f02437e88495d57249f742526526ee5865777.tar
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst
cuberite-1e6f02437e88495d57249f742526526ee5865777.zip
Diffstat (limited to 'src/Mobs/Path.cpp')
-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..1848e144e 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 = CeilC(a_BoundingBoxWidth);
+ m_BoundingBoxHeight = CeilC(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 = FloorC(a_BoundingBoxWidth / 2);
+ m_Source.x = FloorC(a_StartingPoint.x - HalfWidthInt);
+ m_Source.y = FloorC(a_StartingPoint.y);
+ m_Source.z = FloorC(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 = FloorC(a_EndingPoint.x - HalfWidthInt);
+ m_Destination.y = FloorC(a_EndingPoint.y);
+ m_Destination.z = FloorC(a_EndingPoint.z - HalfWidthInt);
if (GetCell(m_Source)->m_IsSolid || GetCell(m_Destination)->m_IsSolid)
{