From 8656e149c8820272a882406912790f0075ed5f28 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 30 Jun 2015 15:50:15 +0100 Subject: Improved maps --- src/Items/ItemEmptyMap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemEmptyMap.h') 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); -- cgit v1.2.3