From c2758706732871166eef845ce017b2f0c7b1fddf Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 8 Oct 2016 19:13:50 +0200 Subject: 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. :( --- source/blender/blenloader/intern/readfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e3b06b07222..c1da78d3877 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -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) { -- cgit v1.2.3