diff options
| author | untodesu <kirill@untode.su> | 2025-06-28 01:59:49 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-06-28 01:59:49 +0500 |
| commit | 61e5bcef2629e2d68b805a956a96fff264d4f74d (patch) | |
| tree | bca3a94bac79d34e3c0db57c77604f5a823ecbda /game/server/overworld.cc | |
| parent | 88c01588aa0830e219eaa62588839e4d1e2883ce (diff) | |
| download | voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.tar.bz2 voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.zip | |
Restructure dependencies and update to C++20
- Nuked static_assert from almost everywhere in the project
- Nuked binary dependency support. Might add one later though
- Separated dependency headers into a separate include subdirectory
- Grafted a thirdpartylegalnotices.txt generator from RITEG
- Pushed development snapshot version to 2126 (26th week of 2025)
Diffstat (limited to 'game/server/overworld.cc')
| -rw-r--r-- | game/server/overworld.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/game/server/overworld.cc b/game/server/overworld.cc index 7021717..a280e06 100644 --- a/game/server/overworld.cc +++ b/game/server/overworld.cc @@ -12,7 +12,7 @@ static void compute_tree_feature(unsigned int height, Feature& feature, voxel_id log_voxel, voxel_id leaves_voxel) { // Ensure the tree height is too small - height = cxpr::max<unsigned int>(height, 4U); + height = vx::max<unsigned int>(height, 4U); // Put down a single piece of dirt feature.push_back({ voxel_pos(0, -1, 0), game_voxels::dirt, true }); @@ -214,14 +214,14 @@ const Overworld_Metadata& Overworld::get_or_create_metadata(const chunk_pos_xz& } auto nvdi_value = 0.5f + 0.5f * fnlGetNoise2D(&m_fnl_nvdi, cpos.x, cpos.y); - auto tree_density = (nvdi_value >= 0.33f) ? cxpr::floor<unsigned int>(nvdi_value * 4.0f) : 0U; + auto tree_density = (nvdi_value >= 0.33f) ? vx::floor<unsigned int>(nvdi_value * 4.0f) : 0U; for(unsigned int i = 0U; i < tree_density; ++i) { auto lpos = local_pos((twister() % CHUNK_SIZE), (twister() % OW_NUM_TREES), (twister() % CHUNK_SIZE)); auto is_unique = true; for(const auto& check_lpos : metadata.trees) { - if(cxvectors::distance2(check_lpos, lpos) <= 9) { + if(vx::distance2(check_lpos, lpos) <= 9) { is_unique = false; break; } @@ -350,7 +350,7 @@ void Overworld::generate_features(const chunk_pos& cpos, VoxelStorage& voxels) chunk_pos_xz(cpos.x + 1, cpos.z + 1), }; - for(unsigned int i = 0U; i < cxpr::array_size(tree_chunks); ++i) { + for(unsigned int i = 0U; i < vx::array_size(tree_chunks); ++i) { const auto& cpos_xz = tree_chunks[i]; const auto& metadata = get_or_create_metadata(cpos_xz); |
