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:
authorCampbell Barton <ideasman42@gmail.com>2010-11-05 16:37:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-05 16:37:18 +0300
commit66b274766a0584a74a63bb2b039f2a71e5b48534 (patch)
tree4290cfbe56adb51e3e1d2dce3ec646c3d2526988 /source/blender/blenkernel/intern/particle_system.c
parente202aa6e6609d957db48c0ae8bbce54c0aa454f0 (diff)
minor c90 compat edits. (no functional changes).
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 504105d5950..2b045647661 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1705,9 +1705,10 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
r_phase = PSYS_FRAND(p + 20);
if(part->from==PART_FROM_PARTICLE){
- ParticleSimulationData tsim = {sim->scene, psys->target_ob ? psys->target_ob : ob, NULL, NULL};
float speed;
-
+ ParticleSimulationData tsim= {0};
+ tsim.scene= sim->scene;
+ tsim.ob= psys->target_ob ? psys->target_ob : ob;
tsim.psys = BLI_findlink(&tsim.ob->particlesystem, sim->psys->target_psys-1);
state.time = pa->time;
@@ -2057,12 +2058,14 @@ void psys_count_keyed_targets(ParticleSimulationData *sim)
static void set_keyed_keys(ParticleSimulationData *sim)
{
ParticleSystem *psys = sim->psys;
- ParticleSimulationData ksim = {sim->scene, NULL, NULL, NULL};
+ ParticleSimulationData ksim= {0};
ParticleTarget *pt;
PARTICLE_P;
ParticleKey *key;
int totpart = psys->totpart, k, totkeys = psys->totkeyed;
+ ksim.scene= sim->scene;
+
/* no proper targets so let's clear and bail out */
if(psys->totkeyed==0) {
free_keyed_keys(psys);
@@ -3989,7 +3992,7 @@ static int hair_needs_recalc(ParticleSystem *psys)
* then advances in to actual particle calculations depending on particle type */
void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
{
- ParticleSimulationData sim = {scene, ob, psys, NULL, NULL};
+ ParticleSimulationData sim= {0};
ParticleSettings *part = psys->part;
float cfra;
@@ -4000,6 +4003,10 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
return;
cfra= BKE_curframe(scene);
+
+ sim.scene= scene;
+ sim.ob= ob;
+ sim.psys= psys;
sim.psmd= psys_get_modifier(ob, psys);
/* system was already updated from modifier stack */