From 8bcbd2729388edc63c82d77d314b583af1447c49 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 14 Sep 2025 19:16:44 +0500 Subject: Cleanup math with qfengine ports again --- game/server/world/overworld.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/server/world/overworld.cc') diff --git a/game/server/world/overworld.cc b/game/server/world/overworld.cc index 43059d8..b72a816 100644 --- a/game/server/world/overworld.cc +++ b/game/server/world/overworld.cc @@ -15,7 +15,7 @@ static void compute_tree_feature(unsigned int height, world::Feature& feature, c const world::Voxel* leaves_voxel) { // Ensure the tree height is too small - height = math::max(height, 4U); + height = glm::max(height, 4U); // Put down a single piece of dirt feature.push_back({ voxel_pos(0, -1, 0), game_voxels::dirt, true }); @@ -217,7 +217,7 @@ const world::Overworld_Metadata& world::Overworld::get_or_create_metadata(const } auto nvdi_value = 0.5f + 0.5f * fnlGetNoise2D(&m_fnl_nvdi, cpos.x, cpos.y); - auto tree_density = (nvdi_value >= 0.33f) ? math::floor(nvdi_value * 4.0f) : 0U; + auto tree_density = (nvdi_value >= 0.33f) ? static_cast(glm::floor(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)); -- cgit