diff options
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;
}
}
|
