summaryrefslogtreecommitdiff
path: root/indra/newview/noise.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-08-20 10:37:10 -0400
committerOz Linden <oz@lindenlab.com>2013-08-20 10:37:10 -0400
commitc42a91421ff4691e6d2efa5744fe3f246510649c (patch)
tree0ce60a84e78b802c7f936e3b4cb1503edb2fa945 /indra/newview/noise.h
parentd2b947c1fa0757e94eb74429a339a8198531dd93 (diff)
parent171089207b528ab80a954292c127ba77254ee927 (diff)
merge changes for 3.6.3-release
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