Fixing crash in which when you lowered the render distance game would crash.

This commit is contained in:
nowinar 2024-11-02 22:20:02 +01:00
parent ccacb3088f
commit 125f993067

View File

@ -103,9 +103,11 @@ void Planet::ChunkThreadUpdate()
chunks.find({ pos.x, pos.y, pos.z - 1 }) == chunks.end())
{
delete chunkData.at(pos);
chunkData.erase(pos);
it = chunkData.erase(it);
}
else {
++it;
}
++it;
}
// Check if camera moved to new chunk