diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-08-19 16:12:07 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-08-19 16:12:07 -0600 |
commit | 1616b73ef30bcb3e99be68fb7ccc05f0be78ddf6 (patch) | |
tree | e22c94948ed8d8c7f35422fc064172ea3662b264 /indra/newview/noise.h | |
parent | ea45b8acd25785bd2789c2c1928e223c9a8e2fbd (diff) | |
parent | d8c02bf06250015b8cb0bcc9c0d8445cfb6acf1c (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/newview/noise.h')
-rwxr-xr-x | 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 100755 --- 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 |