Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-10-15 05:42:26 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-10-15 05:42:26 +0400
commitf9c41eaaf80fdddb24d5b95cadb51ac859c2d301 (patch)
tree1a9c14ef93a88ac60a27b841aed188f8de9835bb /source
parentcae655f81fe219223d9ff9afaf0ddf8e126c7c80 (diff)
Fix for [#28823] Boids use uninitialized memory.
* Boids need the random velocity vector always.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 6b601ed4b1a..7b2d621aff2 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1607,8 +1607,8 @@ void psys_get_birth_coordinates(ParticleSimulationData *sim, ParticleData *pa, P
}
- /* -velocity */
- if(part->randfac != 0.0f){
+ /* -velocity (boids need this even if there's no random velocity) */
+ if(part->randfac != 0.0f || (part->phystype==PART_PHYS_BOIDS && pa->boid)){
r_vel[0] = 2.0f * (PSYS_FRAND(p + 10) - 0.5f);
r_vel[1] = 2.0f * (PSYS_FRAND(p + 11) - 0.5f);
r_vel[2] = 2.0f * (PSYS_FRAND(p + 12) - 0.5f);