summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-02-15 19:06:47 +0100
committerandrew <xdotftw@gmail.com>2014-02-15 19:06:47 +0100
commitcf96e69716e0ccd0657cf275720bb11b915361c4 (patch)
tree19f61e8cf59268a249be7320a6a085783b832b06 /src/Items
parentEmptyMap item handler (diff)
downloadcuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.tar
cuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.tar.gz
cuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.tar.bz2
cuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.tar.lz
cuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.tar.xz
cuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.tar.zst
cuberite-cf96e69716e0ccd0657cf275720bb11b915361c4.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemEmptyMap.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Items/ItemEmptyMap.h b/src/Items/ItemEmptyMap.h
index 5516033a0..24d31151b 100644
--- a/src/Items/ItemEmptyMap.h
+++ b/src/Items/ItemEmptyMap.h
@@ -18,6 +18,8 @@ class cItemEmptyMapHandler :
public cItemHandler
{
typedef cItemHandler super;
+
+ static const unsigned int DEFAULT_SCALE = 0;
public:
cItemEmptyMapHandler() :
@@ -34,12 +36,12 @@ 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;
+ const int RegionWidth = cChunkDef::Width * 8 * pow(2, DEFAULT_SCALE);
int CenterX = round(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth;
int CenterZ = round(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth;
- a_World->CreateMap(CenterX, CenterZ, 0);
+ a_World->CreateMap(CenterX, CenterZ, DEFAULT_SCALE);
return true;
}