diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-02-24 14:43:46 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-02-24 14:43:46 +0100 |
commit | 9440b61c8c84dcc5b1348505f5e86d59be8a391d (patch) | |
tree | 341d2dec13f382f43452c2f9c01e818c293dcba7 /src/Items | |
parent | Small improvements to boats. (diff) | |
download | cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.gz cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.bz2 cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.lz cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.xz cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.tar.zst cuberite-9440b61c8c84dcc5b1348505f5e86d59be8a391d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemEmptyMap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Items/ItemEmptyMap.h b/src/Items/ItemEmptyMap.h index db28511f3..6618bfce2 100644 --- a/src/Items/ItemEmptyMap.h +++ b/src/Items/ItemEmptyMap.h @@ -36,10 +36,10 @@ public: // The map center is fixed at the central point of the 8x8 block of chunks you are standing in when you right-click it. - const int RegionWidth = cChunkDef::Width * 8 * pow(2, DEFAULT_SCALE); + const int RegionWidth = cChunkDef::Width * 8 * pow(2.0, (double) DEFAULT_SCALE); - int CenterX = round(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth; - int CenterZ = round(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth; + int CenterX = floor(a_Player->GetPosX() / (float) RegionWidth) * RegionWidth; + int CenterZ = floor(a_Player->GetPosZ() / (float) RegionWidth) * RegionWidth; cMap * NewMap = a_World->GetMapManager().CreateMap(CenterX, CenterZ, DEFAULT_SCALE); |