diff options
| author | untodesu <kirill@untode.su> | 2025-09-12 14:09:34 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-12 14:09:34 +0500 |
| commit | 73cbcdd6e8c849e32abbf9757e603e6a6654e870 (patch) | |
| tree | 136e1aef82a25c31552b8990952a7607cfd4708e /game/shared/world/chunk.cc | |
| parent | e9076f22fe2a49d1cd8933e54b7b00c5dd943269 (diff) | |
| download | voxelius-73cbcdd6e8c849e32abbf9757e603e6a6654e870.tar.bz2 voxelius-73cbcdd6e8c849e32abbf9757e603e6a6654e870.zip | |
Metaitems
Diffstat (limited to 'game/shared/world/chunk.cc')
| -rw-r--r-- | game/shared/world/chunk.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/game/shared/world/chunk.cc b/game/shared/world/chunk.cc index b1b19a6..f8f7b93 100644 --- a/game/shared/world/chunk.cc +++ b/game/shared/world/chunk.cc @@ -36,12 +36,7 @@ void world::Chunk::set_voxel(const Voxel* voxel, const local_pos& lpos) void world::Chunk::set_voxel(const Voxel* voxel, const std::size_t index)
{
if(index < CHUNK_VOLUME) {
- if(voxel == nullptr) {
- m_voxels[index] = NULL_VOXEL_ID;
- return;
- }
-
- m_voxels[index] = voxel->get_id();
+ m_voxels[index] = voxel ? voxel->get_id() : NULL_VOXEL_ID;
return;
}
}
|
