mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
Remove the mutexes (part 1)
This commit is contained in:
parent
a85a3ec2d2
commit
802c5f5b38
@ -197,10 +197,6 @@ pub fn getLight(wx: i32, wy: i32, wz: i32) ?[6]u8 {
|
|||||||
const x = (wx >> mesh.chunk.voxelSizeShift) & chunk.chunkMask;
|
const x = (wx >> mesh.chunk.voxelSizeShift) & chunk.chunkMask;
|
||||||
const y = (wy >> mesh.chunk.voxelSizeShift) & chunk.chunkMask;
|
const y = (wy >> mesh.chunk.voxelSizeShift) & chunk.chunkMask;
|
||||||
const z = (wz >> mesh.chunk.voxelSizeShift) & chunk.chunkMask;
|
const z = (wz >> mesh.chunk.voxelSizeShift) & chunk.chunkMask;
|
||||||
mesh.lightingData[0].lock.lockRead();
|
|
||||||
defer mesh.lightingData[0].lock.unlockRead();
|
|
||||||
mesh.lightingData[1].lock.lockRead();
|
|
||||||
defer mesh.lightingData[1].lock.unlockRead();
|
|
||||||
return mesh.lightingData[1].getValue(x, y, z) ++ mesh.lightingData[0].getValue(x, y, z);
|
return mesh.lightingData[1].getValue(x, y, z) ++ mesh.lightingData[0].getValue(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user