New world format, fixes

This commit is contained in:
MihailRis 2023-11-05 15:32:46 +03:00 • committed by GitHub
parent 0c65b13f4e
commit 0cf8382e95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 350 additions and 173 deletions

View file

@ -29,6 +29,13 @@ shared_ptr<Chunk> ChunksStorage::get(int x, int z) const {
return found->second;
}
void ChunksStorage::remove(int x, int z) {
auto found = chunksMap.find(ivec2(x, z));
if (found != chunksMap.end()) {
chunksMap.erase(found->first);
}
}
// some magic code
void ChunksStorage::getVoxels(VoxelsVolume* volume) const {
voxel* voxels = volume->getVoxels();