mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 19:28:49 -04:00
parent
1ba81dc62f
commit
0628c24b6c
@ -235,7 +235,6 @@ const ChunkManager = struct {
|
|||||||
const mask = pos.voxelSize*chunk.chunkSize - 1;
|
const mask = pos.voxelSize*chunk.chunkSize - 1;
|
||||||
std.debug.assert(pos.wx & mask == 0 and pos.wy & mask == 0 and pos.wz & mask == 0);
|
std.debug.assert(pos.wx & mask == 0 and pos.wy & mask == 0 and pos.wz & mask == 0);
|
||||||
const result = chunkCache.find(pos, Chunk.increaseRefCount) orelse return null;
|
const result = chunkCache.find(pos, Chunk.increaseRefCount) orelse return null;
|
||||||
result.increaseRefCount();
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -587,7 +586,7 @@ pub const ServerWorld = struct {
|
|||||||
}
|
}
|
||||||
baseChunk.mutex.lock();
|
baseChunk.mutex.lock();
|
||||||
defer baseChunk.mutex.unlock();
|
defer baseChunk.mutex.unlock();
|
||||||
baseChunk.updateBlock(x, y, z, newBlock);
|
baseChunk.updateBlockAndSetChanged(x, y, z, newBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn queueChunkUpdateAndDecreaseRefCount(self: *ServerWorld, ch: *Chunk) void {
|
pub fn queueChunkUpdateAndDecreaseRefCount(self: *ServerWorld, ch: *Chunk) void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user