summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-25 14:00:25 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-25 14:00:25 +0200
commita6c68189305ad263dd29b22f0ea9a65cba876cb8 (patch)
treec21ede29d1988ae0e8041092beec67035379b562
parentcChestEntity and cDispenserEntity now inherit from a common ancestor, cBlockEntityWithItems (diff)
downloadcuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.tar
cuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.tar.gz
cuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.tar.bz2
cuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.tar.lz
cuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.tar.xz
cuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.tar.zst
cuberite-a6c68189305ad263dd29b22f0ea9a65cba876cb8.zip
Diffstat (limited to '')
-rw-r--r--source/UI/WindowOwner.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/UI/WindowOwner.h b/source/UI/WindowOwner.h
index 7ad4a5739..82293b357 100644
--- a/source/UI/WindowOwner.h
+++ b/source/UI/WindowOwner.h
@@ -111,9 +111,9 @@ public:
virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override
{
- a_BlockX = (int)(m_Entity->GetPosX());
- a_BlockY = (int)(m_Entity->GetPosY());
- a_BlockZ = (int)(m_Entity->GetPosZ());
+ a_BlockX = (int)floor(m_Entity->GetPosX() + 0.5);
+ a_BlockY = (int)floor(m_Entity->GetPosY() + 0.5);
+ a_BlockZ = (int)floor(m_Entity->GetPosZ() + 0.5);
}
private: