Fix for [#24750] Particles draw percentage setting is not working in No Physics mode

This commit is contained in:
Janne Karhu 2010-11-16 16:56:21 +00:00
parent 303646fbd4
commit c658141fad

@ -4080,6 +4080,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
case PART_PHYS_KEYED: case PART_PHYS_KEYED:
{ {
PARTICLE_P; PARTICLE_P;
float disp = (float)psys_get_current_display_percentage(psys)/100.0f;
/* Particles without dynamics haven't been reset yet because they don't use pointcache */ /* Particles without dynamics haven't been reset yet because they don't use pointcache */
if(psys->recalc & PSYS_RECALC_RESET) if(psys->recalc & PSYS_RECALC_RESET)
@ -4097,6 +4098,11 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1); pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1);
reset_particle(&sim, pa, 0.0, cfra); reset_particle(&sim, pa, 0.0, cfra);
if(PSYS_FRAND(p) > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
} }
if(part->phystype == PART_PHYS_KEYED) { if(part->phystype == PART_PHYS_KEYED) {