mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
cleanup World references
This commit is contained in:
parent
ac00c561ee
commit
c73b036099
18 changed files with 45 additions and 45 deletions
|
|
@ -107,7 +107,7 @@ std::shared_ptr<Chunk> GlobalChunks::create(int x, int z, bool lighting) {
|
|||
chunks_pool.create(x, z, lighting ? lightmaps_pool.create() : nullptr);
|
||||
chunksMap[keyfrom(x, z)] = chunk;
|
||||
|
||||
World& world = *level.getWorld();
|
||||
World& world = level.getWorld();
|
||||
auto& regions = world.wfile.get()->getRegions();
|
||||
|
||||
if (regions.getVoxels(chunk->x, chunk->z, voxelDataBuffer.get())) {
|
||||
|
|
@ -197,7 +197,7 @@ void GlobalChunks::save(Chunk* chunk) {
|
|||
if (!entities.empty()) {
|
||||
chunk->flags.entities = true;
|
||||
}
|
||||
level.getWorld()->wfile->getRegions().put(
|
||||
level.getWorld().wfile->getRegions().put(
|
||||
chunk,
|
||||
chunk->flags.entities ? json::to_binary(root, true)
|
||||
: std::vector<ubyte>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue