diff options
Diffstat (limited to 'src/mapgen')
-rw-r--r-- | src/mapgen/mg_ore.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mapgen/mg_ore.cpp b/src/mapgen/mg_ore.cpp index b50ed6a32..5814f433a 100644 --- a/src/mapgen/mg_ore.cpp +++ b/src/mapgen/mg_ore.cpp @@ -498,7 +498,11 @@ void OreVein::generate(MMVManip *vm, int mapseed, u32 blockseed, } // randval ranges from -1..1 - float randval = (float)pr.next() / (pr.RANDOM_RANGE / 2) - 1.f; + /* + Note: can generate values slightly larger than 1 + but this can't be changed as mapgen must be deterministic accross versions. + */ + float randval = (float)pr.next() / float(pr.RANDOM_RANGE / 2) - 1.f; float noiseval = contour(noise->result[index]); float noiseval2 = contour(noise2->result[index]); if (noiseval * noiseval2 + randval * random_factor < nthresh) |