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:
authorJanne Karhu <jhkarh@gmail.com>2010-01-23 18:45:01 +0300
committerJanne Karhu <jhkarh@gmail.com>2010-01-23 18:45:01 +0300
commit9feadd443a69484ec5b56af566d28758cc7ae119 (patch)
tree97355147e633ad439fb6d56f66b88413bc81dc1c /source/blender/blenkernel/intern/effect.c
parent1bb6ba0605d56f5fcb3a190a350659dd2e4ae600 (diff)
Small fixes for particles.
* Particle collision with size was broken since raytrace optimizations by jaguarandi, now the collision code falls back to old slower method when the collision ray has a radius. * Single goal/avoid object now works for boids. * Some tiny improvements on collision avoidance for boids.
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r--source/blender/blenkernel/intern/effect.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index b261d3365af..f4fea899005 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -593,7 +593,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
float cfra = eff->scene->r.cfra;
int ret = 0;
- if(eff->pd->shape==PFIELD_SHAPE_SURFACE && eff->surmd) {
+ if(eff->pd && eff->pd->shape==PFIELD_SHAPE_SURFACE && eff->surmd) {
/* closest point in the object surface is an effector */
float vec[3];
@@ -606,7 +606,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
efd->size = 0.0f;
}
- else if(eff->pd->shape==PFIELD_SHAPE_POINTS) {
+ else if(eff->pd && eff->pd->shape==PFIELD_SHAPE_POINTS) {
if(eff->ob->derivedFinal) {
DerivedMesh *dm = eff->ob->derivedFinal;
@@ -667,7 +667,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
normalize_v3(efd->nor);
/* for vortex the shape chooses between old / new force */
- if(eff->pd->shape == PFIELD_SHAPE_PLANE) {
+ if(eff->pd && eff->pd->shape == PFIELD_SHAPE_PLANE) {
/* efd->loc is closes point on effector xy-plane */
float temp[3];
sub_v3_v3v3(temp, point->loc, ob->obmat[3]);
@@ -698,7 +698,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
efd->distance = len_v3(efd->vec_to_point);
/* rest length for harmonic effector, will have to see later if this could be extended to other effectors */
- if(eff->pd->forcefield == PFIELD_HARMONIC && eff->pd->f_size)
+ if(eff->pd && eff->pd->forcefield == PFIELD_HARMONIC && eff->pd->f_size)
mul_v3_fl(efd->vec_to_point, (efd->distance-eff->pd->f_size)/efd->distance);
if(eff->flag & PE_USE_NORMAL_DATA) {