diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-15 18:13:55 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-15 18:13:55 +0200 |
commit | c390604bc1343705ee17d6466da8dc53b5fa3b0e (patch) | |
tree | cbf9db66aae0fd8a85c88b0b1ef5ae9aea4d20ea /src/Items/ItemEmptyMap.h | |
parent | Merge pull request #2036 from cuberite/sign-metamirror (diff) | |
parent | Improved maps (diff) | |
download | cuberite-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 'src/Items/ItemEmptyMap.h')
-rw-r--r-- | src/Items/ItemEmptyMap.h | 4 |
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); |