[Bf-blender-cvs] [c275870] master: Ammend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.

Bastien Montagne noreply at git.blender.org
Sat Oct 8 19:15:40 CEST 2016


Commit: c2758706732871166eef845ce017b2f0c7b1fddf
Author: Bastien Montagne
Date:   Sat Oct 8 19:13:50 2016 +0200
Branches: master
https://developer.blender.org/rBc2758706732871166eef845ce017b2f0c7b1fddf

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. :(

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e3b06b0..c1da78d 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) {




More information about the Bf-blender-cvs mailing list