summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-10-10 00:12:51 +0200
committerarchshift <admin@archshift.com>2014-10-10 00:12:51 +0200
commitae5d3116097bae7205993605ca463eb1ece3734d (patch)
treee35345c1278193765e3d170e928c44e3a469930a /src/Entities/Entity.h
parentDistortedHeightmap: Fixed crash on number rounding. (diff)
parentFloat/Ciel: If it's going to use C++11, it might as well take advantage of it (diff)
downloadcuberite-ae5d3116097bae7205993605ca463eb1ece3734d.tar
cuberite-ae5d3116097bae7205993605ca463eb1ece3734d.tar.gz
cuberite-ae5d3116097bae7205993605ca463eb1ece3734d.tar.bz2
cuberite-ae5d3116097bae7205993605ca463eb1ece3734d.tar.lz
cuberite-ae5d3116097bae7205993605ca463eb1ece3734d.tar.xz
cuberite-ae5d3116097bae7205993605ca463eb1ece3734d.tar.zst
cuberite-ae5d3116097bae7205993605ca463eb1ece3734d.zip
Diffstat (limited to 'src/Entities/Entity.h')
-rw-r--r--src/Entities/Entity.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 3fa7e80c1..f0577aba2 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -27,9 +27,9 @@
return super::GetClass(); \
}
-#define POSX_TOINT (int)floor(GetPosX())
-#define POSY_TOINT (int)floor(GetPosY())
-#define POSZ_TOINT (int)floor(GetPosZ())
+#define POSX_TOINT FloorC(GetPosX())
+#define POSY_TOINT FloorC(GetPosY())
+#define POSZ_TOINT FloorC(GetPosZ())
#define POS_TOINT Vector3i(POSXTOINT, POSYTOINT, POSZTOINT)
#define GET_AND_VERIFY_CURRENT_CHUNK(ChunkVarName, X, Z) cChunk * ChunkVarName = a_Chunk.GetNeighborChunk(X, Z); if ((ChunkVarName == NULL) || !ChunkVarName->IsValid()) { return; }