diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-06-30 16:50:15 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-14 22:46:30 +0200 |
commit | 8656e149c8820272a882406912790f0075ed5f28 (patch) | |
tree | b4f89f69dfb026f76862046637fd99162a49d3c9 /src/Items/ItemEmptyMap.h | |
parent | Merge pull request #2352 from mmdk95/master (diff) | |
download | cuberite-8656e149c8820272a882406912790f0075ed5f28.tar cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.gz cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.bz2 cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.lz cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.xz cuberite-8656e149c8820272a882406912790f0075ed5f28.tar.zst cuberite-8656e149c8820272a882406912790f0075ed5f28.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); |