1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Fix warnings about an unused variables and implicit conversion (#10586)

This commit is contained in:
red-001 2020-11-12 20:05:47 +00:00 committed by GitHub
parent 68139a28eb
commit 8eb2cbac61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -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)