From b1fc666448e66b63a06fe7320305fa9f1efa035d Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 17 Dec 2024 20:56:25 +0300 Subject: [PATCH] fix --- src/voxels/Chunks.cpp | 2 +- src/world/generator/WorldGenerator.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/voxels/Chunks.cpp b/src/voxels/Chunks.cpp index 960b8f6c..37eae563 100644 --- a/src/voxels/Chunks.cpp +++ b/src/voxels/Chunks.cpp @@ -40,7 +40,7 @@ Chunks::Chunks( void Chunks::configure(int32_t x, int32_t z, uint32_t radius) { setCenter(x, z); - uint32_t diameter = radius * 2LL + 1; + uint32_t diameter = radius * 2LL; if (getWidth() != diameter) { resize(diameter, diameter); } diff --git a/src/world/generator/WorldGenerator.cpp b/src/world/generator/WorldGenerator.cpp index 281ac411..ef3c3f7f 100644 --- a/src/world/generator/WorldGenerator.cpp +++ b/src/world/generator/WorldGenerator.cpp @@ -354,8 +354,8 @@ void WorldGenerator::generateHeightmap( void WorldGenerator::update(int centerX, int centerY, int loadDistance) { surroundMap.setCenter(centerX, centerY); - // 1 is safety padding preventing ChunksController rounding problem - surroundMap.resize(loadDistance + 1); + // 2 is safety padding preventing ChunksController rounding problem + surroundMap.resize(loadDistance + 2); surroundMap.setCenter(centerX, centerY); }