diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-16 03:12:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-16 03:12:40 +0400 |
commit | afb4b65167165613f177a531bd3d4dcb3649c1c6 (patch) | |
tree | 32e1446b5fc3ce8ec00fa0e8b9e0fcb2eedda127 /source/blender/blenkernel/BKE_boids.h | |
parent | 638b084f824bc345468bc8e02422b5da65a641a7 (diff) |
Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.
Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
Diffstat (limited to 'source/blender/blenkernel/BKE_boids.h')
-rw-r--r-- | source/blender/blenkernel/BKE_boids.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h index bb724c6632e..582cd0cef8d 100644 --- a/source/blender/blenkernel/BKE_boids.h +++ b/source/blender/blenkernel/BKE_boids.h @@ -36,6 +36,8 @@ #include "DNA_boid_types.h" +struct RNG; + typedef struct BoidBrainData { struct ParticleSimulationData *sim; struct ParticleSettings *part; @@ -47,6 +49,8 @@ typedef struct BoidBrainData { float goal_co[3]; float goal_nor[3]; float goal_priority; + + struct RNG *rng; } BoidBrainData; void boids_precalc_rules(struct ParticleSettings *part, float cfra); |