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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/boids.c')
-rw-r--r--source/blender/blenkernel/intern/boids.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 5c2c0721972..1bde0639055 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -205,7 +205,9 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
add_v3_v3v3(col.co2, pa->prev_state.co, pa->prev_state.vel);
sub_v3_v3v3(ray_dir, col.co2, col.co1);
mul_v3_fl(ray_dir, acbr->look_ahead);
- col.t = 0.0f;
+ col.f = 0.0f;
+ col.cfra = fmod(bbd->cfra-bbd->dfra, 1.0f);
+ col.dfra = bbd->dfra;
hit.index = -1;
hit.dist = col.ray_len = len_v3(ray_dir);
@@ -772,7 +774,9 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
sub_v3_v3v3(col.co2, pa->state.co, zvec);
sub_v3_v3(col.co2, zvec);
sub_v3_v3v3(ray_dir, col.co2, col.co1);
- col.t = 0.0f;
+ col.f = 0.0f;
+ col.cfra = fmod(bbd->cfra-bbd->dfra, 1.0f);
+ col.dfra = bbd->dfra;
hit.index = -1;
hit.dist = col.ray_len = len_v3(ray_dir);
@@ -796,7 +800,9 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
sub_v3_v3v3(col.co2, pa->state.co, zvec);
sub_v3_v3(col.co2, zvec);
sub_v3_v3v3(ray_dir, col.co2, col.co1);
- col.t = 0.0f;
+ col.f = 0.0f;
+ col.cfra = fmod(bbd->cfra-bbd->dfra, 1.0f);
+ col.dfra = bbd->dfra;
hit.index = -1;
hit.dist = col.ray_len = len_v3(ray_dir);