summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-27 09:06:25 +0100
committermadmaxoft <github@xoft.cz>2014-02-27 09:06:25 +0100
commit9c6d72a023807fca238361d636a52166f952fa59 (patch)
treeee0fae00f57df34dd3437bc599ba007b97b22619 /src/Items
parentFixed a gcc warning in FastNBT.h. (diff)
downloadcuberite-9c6d72a023807fca238361d636a52166f952fa59.tar
cuberite-9c6d72a023807fca238361d636a52166f952fa59.tar.gz
cuberite-9c6d72a023807fca238361d636a52166f952fa59.tar.bz2
cuberite-9c6d72a023807fca238361d636a52166f952fa59.tar.lz
cuberite-9c6d72a023807fca238361d636a52166f952fa59.tar.xz
cuberite-9c6d72a023807fca238361d636a52166f952fa59.tar.zst
cuberite-9c6d72a023807fca238361d636a52166f952fa59.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemEmptyMap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Items/ItemEmptyMap.h b/src/Items/ItemEmptyMap.h
index 6618bfce2..f0b1e1424 100644
--- a/src/Items/ItemEmptyMap.h
+++ b/src/Items/ItemEmptyMap.h
@@ -36,10 +36,10 @@ public:
// The map center is fixed at the central point of the 8x8 block of chunks you are standing in when you right-click it.
- const int RegionWidth = cChunkDef::Width * 8 * pow(2.0, (double) DEFAULT_SCALE);
+ const int RegionWidth = cChunkDef::Width * 8;
- int CenterX = floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth;
- int CenterZ = floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth;
+ int CenterX = (int)(floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth);
+ int CenterZ = (int)(floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth);
cMap * NewMap = a_World->GetMapManager().CreateMap(CenterX, CenterZ, DEFAULT_SCALE);