From a8fa9fe920d4ed48ed1b88a6e585cdbff648039e Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 16 Mar 2025 20:18:16 +0500 Subject: Improved terrain generation - features! [1/2] - @reglnk asked me to commit this early to experiment with this weird-ass heightmap bug that messes with tree placement --- game/shared/chunk.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'game/shared/chunk.cc') diff --git a/game/shared/chunk.cc b/game/shared/chunk.cc index c996973..17fdcc1 100644 --- a/game/shared/chunk.cc +++ b/game/shared/chunk.cc @@ -8,6 +8,7 @@ Chunk::Chunk(entt::entity entity, Dimension *dimension) m_entity = entity; m_dimension = dimension; m_voxels.fill(NULL_VOXEL_ID); + m_biome = BIOME_VOID; } voxel_id Chunk::get_voxel(const local_pos &lpos) const @@ -44,6 +45,16 @@ void Chunk::set_voxels(const VoxelStorage &voxels) m_voxels = voxels; } +unsigned int Chunk::get_biome(void) const +{ + return m_biome; +} + +void Chunk::set_biome(unsigned int biome) +{ + m_biome = biome; +} + entt::entity Chunk::get_entity(void) const { return m_entity; -- cgit