diff options
| author | untodesu <kirill@untode.su> | 2025-03-16 20:31:09 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-03-16 20:31:09 +0500 |
| commit | 800cb5a2e813a44ea698c812614252fc48dcc432 (patch) | |
| tree | 3c6ea345998683a80955bf4c09c419a7ae37dc5a /game | |
| parent | a8fa9fe920d4ed48ed1b88a6e585cdbff648039e (diff) | |
| download | voxelius-800cb5a2e813a44ea698c812614252fc48dcc432.tar.bz2 voxelius-800cb5a2e813a44ea698c812614252fc48dcc432.zip | |
Improved terrain generation - features! [2/2]
Diffstat (limited to 'game')
| -rw-r--r-- | game/server/overworld.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/game/server/overworld.cc b/game/server/overworld.cc index e66addf..16a3120 100644 --- a/game/server/overworld.cc +++ b/game/server/overworld.cc @@ -338,7 +338,9 @@ void Overworld::generate_features(const chunk_pos &cpos, VoxelStorage &voxels) auto cpos_xyz = chunk_pos(cpos_xz.x, 0, cpos_xz.y); auto lpos_xyz = local_pos(lpos_xz.x, 0, lpos_xz.y); + auto vpos = coord::to_voxel(cpos_xyz, lpos_xyz); + vpos.y = height; if(is_inside_cave(vpos)) { // Cave is in the way |
