Fix T43768: Pointcache end frame ignores preview range

Fix for T43768

This way it works consistent with cloth, softbodys, etc.

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D1134
This commit is contained in:
Julian Eisel 2015-02-22 17:14:19 +01:00
parent 63b0a7feb2
commit 0f1ffd4792

@ -1191,7 +1191,7 @@ void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra
ParticleSettings *part = psys->part;
*sfra = MAX2(1, (int)part->sta);
*efra = MIN2((int)(part->end + part->lifetime + 1.0f), scene->r.efra);
*efra = MIN2((int)(part->end + part->lifetime + 1.0f), MAX2(scene->r.pefra, scene->r.efra));
}
/************************************************/