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:
parent
7679396ebb
commit
3993093f51
10 changed files with 415 additions and 179 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue