summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemEmptyMap.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-15 18:13:55 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-15 18:13:55 +0200
commitc390604bc1343705ee17d6466da8dc53b5fa3b0e (patch)
treecbf9db66aae0fd8a85c88b0b1ef5ae9aea4d20ea /src/Items/ItemEmptyMap.h
parentMerge pull request #2036 from cuberite/sign-metamirror (diff)
parentImproved maps (diff)
downloadcuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.gz
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.bz2
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.lz
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.xz
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.zst
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemEmptyMap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Items/ItemEmptyMap.h b/src/Items/ItemEmptyMap.h
index fba8c0a2c..98352bd2d 100644
--- a/src/Items/ItemEmptyMap.h
+++ b/src/Items/ItemEmptyMap.h
@@ -43,8 +43,8 @@ public:
const int RegionWidth = cChunkDef::Width * 8;
- int CenterX = (int)(floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth);
- int CenterZ = (int)(floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth);
+ int CenterX = FloorC(a_Player->GetPosX() / RegionWidth) * RegionWidth + (RegionWidth / 2);
+ int CenterZ = FloorC(a_Player->GetPosZ() / RegionWidth) * RegionWidth + (RegionWidth / 2);
cMap * NewMap = a_World->GetMapManager().CreateMap(CenterX, CenterZ, DEFAULT_SCALE);