From 73cbcdd6e8c849e32abbf9757e603e6a6654e870 Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 12 Sep 2025 14:09:34 +0500 Subject: Metaitems --- game/shared/world/chunk.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'game/shared/world/chunk.cc') 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; } } -- cgit