aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_v5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen_v5.cpp')
-rw-r--r--src/mapgen_v5.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mapgen_v5.cpp b/src/mapgen_v5.cpp
index dbbd72936..d534249a5 100644
--- a/src/mapgen_v5.cpp
+++ b/src/mapgen_v5.cpp
@@ -160,7 +160,7 @@ void MapgenV5Params::readParams(const Settings *settings)
void MapgenV5Params::writeParams(Settings *settings) const
{
- settings->setFlagStr("mgv5_spflags", spflags, flagdesc_mapgen_v5, (u32)-1);
+ settings->setFlagStr("mgv5_spflags", spflags, flagdesc_mapgen_v5, U32_MAX);
settings->setNoiseParams("mgv5_np_filler_depth", np_filler_depth);
settings->setNoiseParams("mgv5_np_factor", np_factor);
@@ -429,7 +429,7 @@ MgStoneType MapgenV5::generateBiomes(float *heat_map, float *humidity_map)
// If there is air or water above enable top/filler placement, otherwise force
// nplaced to stone level by setting a number exceeding any possible filler depth.
- u16 nplaced = (air_above || water_above) ? 0 : (u16)-1;
+ u16 nplaced = (air_above || water_above) ? 0 : U16_MAX;
for (s16 y = node_max.Y; y >= node_min.Y; y--) {
content_t c = vm->m_data[vi].getContent();
@@ -466,7 +466,7 @@ MgStoneType MapgenV5::generateBiomes(float *heat_map, float *humidity_map)
// This is done by aborting the cycle of top/filler placement
// immediately by forcing nplaced to stone level.
if (c_below == CONTENT_AIR || c_below == c_water_source)
- nplaced = (u16)-1;
+ nplaced = U16_MAX;
if (nplaced < depth_top) {
vm->m_data[vi] = MapNode(biome->c_top);
@@ -491,7 +491,7 @@ MgStoneType MapgenV5::generateBiomes(float *heat_map, float *humidity_map)
air_above = true;
water_above = false;
} else { // Possible various nodes overgenerated from neighbouring mapchunks
- nplaced = (u16)-1; // Disable top/filler placement
+ nplaced = U16_MAX; // Disable top/filler placement
air_above = false;
water_above = false;
}