1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

working good

This commit is contained in:
Perttu Ahola 2010-12-26 13:51:56 +02:00
parent 4ba5cd580d
commit c32da52104
8 changed files with 65 additions and 221 deletions

View file

@ -143,7 +143,7 @@ void FixedHeightmap::makeDiamond(
f32 n = avgDiagNeighbours(center, a/2);
// Add (-1.0...1.0) * randmax
n += ((float)rand() / (float)(RAND_MAX/2) - 1.0)*randmax;
n += ((float)myrand() / (float)(MYRAND_MAX/2) - 1.0)*randmax;
bool worked = setGroundHeightParent(center, n);
if(a >= 2 && worked)
@ -176,7 +176,7 @@ void FixedHeightmap::makeSquare(
f32 n = avgNeighbours(center, a/2);
// Add (-1.0...1.0) * randmax
n += ((float)rand() / (float)(RAND_MAX/2) - 1.0)*randmax;
n += ((float)myrand() / (float)(MYRAND_MAX/2) - 1.0)*randmax;
bool worked = setGroundHeightParent(center, n);
if(a >= 4 && worked)