diff options
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); |