Ammend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.

This code is confusing, such dirty details should not sneak out of
particles' own private code. :(
This commit is contained in:
Bastien Montagne 2016-10-08 19:13:50 +02:00 committed by Sergey Sharybin
parent 97bba76e8c
commit 7ab972fd63
1 changed files with 2 additions and 1 deletions

View File

@ -4281,9 +4281,10 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
if (psys->particles && psys->particles->boid) {
pa = psys->particles;
pa->boid = newdataadr(fd, pa->boid);
pa->boid->ground = NULL; /* This is purely runtime data, but still can be an issue if left dangling. */
for (a = 1, pa++; a < psys->totpart; a++, pa++) {
pa->boid = (pa - 1)->boid + 1;
pa->boid->ground = NULL; /* This is purely runtime data, but still can be an issue if left dangling. */
pa->boid->ground = NULL;
}
}
else if (psys->particles) {