summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-09-04 01:25:45 +0200
committerarchshift <admin@archshift.com>2014-10-09 23:57:40 +0200
commitf8d1e96ae7ac9a3483ff0a214796455946d7880f (patch)
treed54f1700231c510327e1e98042c3f21ddbe00ea6 /src/Entities
parentDistortedHeightmap: Fixed crash on number rounding. (diff)
downloadcuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.tar
cuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.tar.gz
cuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.tar.bz2
cuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.tar.lz
cuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.tar.xz
cuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.tar.zst
cuberite-f8d1e96ae7ac9a3483ff0a214796455946d7880f.zip
Diffstat (limited to 'src/Entities')
-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..0a03eb3f2 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 FloorD(GetPosX())
+#define POSY_TOINT FloorD(GetPosY())
+#define POSZ_TOINT FloorD(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; }