diff options
-rw-r--r-- | indra/newview/noise.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/noise.h b/indra/newview/noise.h index 0923bffcf2..b3efad73c5 100644 --- a/indra/newview/noise.h +++ b/indra/newview/noise.h @@ -310,6 +310,8 @@ static void normalize3(F32 v[3]) static void init(void) { + // we want repeatable noise (e.g. for stable terrain texturing), so seed with known value + srand(42); int i, j, k; for (i = 0 ; i < B ; i++) { @@ -340,6 +342,9 @@ static void init(void) for (j = 0 ; j < 3 ; j++) g3[B + i][j] = g3[i][j]; } + + // reintroduce entropy + srand(time(NULL)); // Flawfinder: ignore } #undef B |