mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
docs: Chunks.seekOrigin, Chunks.checkReplaceability
This commit is contained in:
parent
1bfd5ccad3
commit
2dfd2abc40
2 changed files with 16 additions and 2 deletions
|
|
@ -158,8 +158,9 @@ Chunk* Chunks::getChunkByVoxel(int32_t x, int32_t y, int32_t z) {
|
|||
Chunk* Chunks::getChunk(int x, int z){
|
||||
x -= ox;
|
||||
z -= oz;
|
||||
if (x < 0 || z < 0 || x >= int(w) || z >= int(d))
|
||||
if (x < 0 || z < 0 || x >= static_cast<int>(w) || z >= static_cast<int>(d)) {
|
||||
return nullptr;
|
||||
}
|
||||
return chunks[z * w + x].get();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue