mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
fix
This commit is contained in:
parent
49dd866c22
commit
b1fc666448
2 changed files with 3 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ Chunks::Chunks(
|
||||||
|
|
||||||
void Chunks::configure(int32_t x, int32_t z, uint32_t radius) {
|
void Chunks::configure(int32_t x, int32_t z, uint32_t radius) {
|
||||||
setCenter(x, z);
|
setCenter(x, z);
|
||||||
uint32_t diameter = radius * 2LL + 1;
|
uint32_t diameter = radius * 2LL;
|
||||||
if (getWidth() != diameter) {
|
if (getWidth() != diameter) {
|
||||||
resize(diameter, diameter);
|
resize(diameter, diameter);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -354,8 +354,8 @@ void WorldGenerator::generateHeightmap(
|
||||||
|
|
||||||
void WorldGenerator::update(int centerX, int centerY, int loadDistance) {
|
void WorldGenerator::update(int centerX, int centerY, int loadDistance) {
|
||||||
surroundMap.setCenter(centerX, centerY);
|
surroundMap.setCenter(centerX, centerY);
|
||||||
// 1 is safety padding preventing ChunksController rounding problem
|
// 2 is safety padding preventing ChunksController rounding problem
|
||||||
surroundMap.resize(loadDistance + 1);
|
surroundMap.resize(loadDistance + 2);
|
||||||
surroundMap.setCenter(centerX, centerY);
|
surroundMap.setCenter(centerX, centerY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue