diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-26 02:20:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-26 02:20:26 +0400 |
commit | 580d000f8fa6d65bfbab348aeee1719cffebf8cb (patch) | |
tree | a3daae581ea08843ed53e1e2144e428c6d91142a /source/blender/blenkernel/intern/boids.c | |
parent | c543eca36e9bc568dcfaa8fb6aa039ed6726a7d6 (diff) |
2.5:
* Fix crash entering particle mode, and particles not showing.
Janne, please check the changes I made in psys_cache_paths,
I'm not confident they are correct.
* Fix some warnings
Diffstat (limited to 'source/blender/blenkernel/intern/boids.c')
-rw-r--r-- | source/blender/blenkernel/intern/boids.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 931ad0b3043..d8926fc5753 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -399,7 +399,7 @@ static int rule_flock(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti KDTreeNearest ptn[11]; float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f}; int neighbors = BLI_kdtree_find_n_nearest(bbd->psys->tree, 11, pa->state.co, pa->prev_state.ave, ptn); - int n, nearest = 1; + int n; int ret = 0; if(neighbors > 1) { @@ -898,8 +898,6 @@ static BoidState *get_boid_state(BoidSettings *boids, ParticleData *pa) { /* determines the velocity the boid wants to have */ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa) { - ParticleData *pars=bbd->psys->particles; - ParticleEffectorCache *ec=0; BoidRule *rule; BoidSettings *boids = bbd->part->boids; BoidValues val; @@ -1259,7 +1257,6 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa) } case eBoidMode_Falling: { - float zvec[3] = {0.0f,0.0f,1.0f}; float grav[3] = {0.0f, 0.0f, bbd->part->acc[2] < 0.0f ? -1.0f : 0.0f}; /* gather apparent gravity to r_ve */ @@ -1523,4 +1520,5 @@ BoidState *boid_get_current_state(BoidSettings *boids) } return state; -}
\ No newline at end of file +} + |