summaryrefslogtreecommitdiff
path: root/indra/newview/noise.h
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-08-22 16:12:40 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-08-22 16:12:40 -0400
commita3b1a60ed76ac9661bd245e7d5bb801be852944c (patch)
tree7958d835b5f3a5f210f6361d40f1d5eeee68ef58 /indra/newview/noise.h
parent0094c4299f6fb627c0a759374ede39450efdc8d0 (diff)
parent171089207b528ab80a954292c127ba77254ee927 (diff)
merge
Diffstat (limited to 'indra/newview/noise.h')
-rwxr-xr-xindra/newview/noise.h5
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