diff options
| author | untodesu <kirill@untode.su> | 2025-03-16 20:18:16 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-03-16 20:18:16 +0500 |
| commit | a8fa9fe920d4ed48ed1b88a6e585cdbff648039e (patch) | |
| tree | 63520fe106ff2e445fa93d2992d14d4f7e60b8e5 /game/shared/chunk.cc | |
| parent | 933ed978a21d5ffefc376d66f0dc9f5354292ca7 (diff) | |
| download | voxelius-a8fa9fe920d4ed48ed1b88a6e585cdbff648039e.tar.bz2 voxelius-a8fa9fe920d4ed48ed1b88a6e585cdbff648039e.zip | |
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
Diffstat (limited to 'game/shared/chunk.cc')
| -rw-r--r-- | game/shared/chunk.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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; |
