summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-02-24 15:21:28 +0100
committerMattes D <github@xoft.cz>2014-02-24 15:21:28 +0100
commit2deeef3cdfd432854447bb5fec0270a36e5ee881 (patch)
tree341d2dec13f382f43452c2f9c01e818c293dcba7 /src/Items
parentSmall improvements to boats. (diff)
parentFixed MCServer not compiling with C++03 compilers (diff)
downloadcuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar
cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.gz
cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.bz2
cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.lz
cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.xz
cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.tar.zst
cuberite-2deeef3cdfd432854447bb5fec0270a36e5ee881.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 db28511f3..6618bfce2 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, DEFAULT_SCALE);
+ const int RegionWidth = cChunkDef::Width * 8 * pow(2.0, (double) DEFAULT_SCALE);
- int CenterX = round(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth;
- int CenterZ = round(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth;
+ int CenterX = floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth;
+ int CenterZ = floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth;
cMap * NewMap = a_World->GetMapManager().CreateMap(CenterX, CenterZ, DEFAULT_SCALE);