1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add support for the PCG32 PRNG algo (and associated script APIs)

This commit is contained in:
kwolekr 2015-03-22 00:01:46 -04:00
parent 7679396ebb
commit 3993093f51
10 changed files with 415 additions and 179 deletions

View file

@ -308,7 +308,7 @@ void OreVein::generate(MMVManip *vm, int mapseed, u32 blockseed,
}
// randval ranges from -1..1
float randval = (float)pr.next() / (PSEUDORANDOM_MAX / 2) - 1.f;
float randval = (float)pr.next() / (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)