mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
fix "upgrade square is not fully inside of area" error
This commit is contained in:
parent
8a21bd212c
commit
bf79f6bc75
2 changed files with 7 additions and 4 deletions
|
|
@ -35,12 +35,14 @@ void ChunksController::update(
|
|||
int64_t maxDuration, int loadDistance, uint padding, Player& player
|
||||
) const {
|
||||
const auto& position = player.getPosition();
|
||||
int centerX = floordiv<CHUNK_W>(position.x);
|
||||
int centerY = floordiv<CHUNK_D>(position.z);
|
||||
int centerX = floordiv<CHUNK_W>(glm::floor(position.x));
|
||||
int centerY = floordiv<CHUNK_D>(glm::floor(position.z));
|
||||
|
||||
if (player.isLoadingChunks()) {
|
||||
/// FIXME: one generator for multiple players
|
||||
generator->update(centerX, centerY, loadDistance);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
int64_t mcstotal = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue