Fixed a bug in getSurroundingChunks.
This commit is contained in:
parent
32b9d6597e
commit
9ea1630057
@ -167,7 +167,7 @@ std::vector<Chunk*> Level::getSurroundingChunks() {
|
|||||||
if (zEnd >= chunks.at(0).size()) {
|
if (zEnd >= chunks.at(0).size()) {
|
||||||
zEnd = chunks.at(0).size()-1;
|
zEnd = chunks.at(0).size()-1;
|
||||||
}
|
}
|
||||||
std::vector<Chunk*> vector = std::vector<Chunk*>((2*renderDistance)*(2*renderDistance));
|
std::vector<Chunk*> vector = std::vector<Chunk*>((xEnd - xStart + 1)*(zEnd - zStart + 1));
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
for(unsigned int i = xStart; i<=xEnd; i++) {
|
for(unsigned int i = xStart; i<=xEnd; i++) {
|
||||||
for(unsigned int j = zStart; j<=zEnd; j++) {
|
for(unsigned int j = zStart; j<=zEnd; j++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user