Skip to content

Commit

Permalink
bug chunks regler
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas92g committed May 9, 2021
1 parent 5eec0b9 commit 606ea9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TERRAIN/Land.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void Land::update()
directionOfTheLoading = lookChunk;

else {
break;
return;
}

chunkToLoad += directionOfTheLoading;
Expand All @@ -149,13 +149,13 @@ void Land::update()

if (!isLoaded(chunkToLoad)) {
land[chunkToLoad.x][chunkToLoad.y] = std::make_shared<Chunk>(chunkToLoad, resolutionOfChunks, render);
break;
return;
}

if (land[chunkToLoad.x][chunkToLoad.y]->getResolution() != resolutionOfChunks) {
land[chunkToLoad.x][chunkToLoad.y]->setResolution(resolutionOfChunks);
if(resolutionOfChunks == nearResolution) needToReloadTrees = true;
break;
return;
}
}
}
Expand Down

0 comments on commit 606ea9e

Please sign in to comment.