diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-07-10 21:04:56 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-07-10 21:04:56 +0400 |
commit | de7592b48900221844fa8d687e9d850294c90746 (patch) | |
tree | dcd7847e24b53d32593ed4ad40c3e149714f0dcd /source/blender/blenkernel/intern/boids.c | |
parent | b62a956cc8c9402880d249d0a70c880af5813bc3 (diff) |
Fix for [#26873] Animated displacement modifier on an object doesn't work with hair particle objects
* Noise is now considered an animated texture as it changes with every frame
* Converted a few places in particles code to use the particle system's own random table instead of BLI_frand.
Diffstat (limited to 'source/blender/blenkernel/intern/boids.c')
-rw-r--r-- | source/blender/blenkernel/intern/boids.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 9f808704eee..a0f38e675f9 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -937,6 +937,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa) BoidValues val; BoidState *state = get_boid_state(boids, pa); BoidParticle *bpa = pa->boid; + ParticleSystem *psys = bbd->sim->psys; int rand; //BoidCondition *cond; @@ -959,9 +960,8 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa) bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f; /* create random seed for every particle & frame */ - BLI_srandom(bbd->sim->psys->seed + p); - rand = BLI_rand(); - BLI_srandom((int)bbd->cfra + rand); + rand = (int)(PSYS_FRAND(psys->seed + p) * 1000); + rand = (int)(PSYS_FRAND((int)bbd->cfra + rand) * 1000); set_boid_values(&val, bbd->part->boids, pa); |