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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-19 08:07:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-19 08:07:01 +0400
commit0abe99343584ddfbf9f508f145a36a66312a2a60 (patch)
tree69aa7f76ec06e74aab2ab7a4330cdc7bb3f8c60e /source/blender/blenkernel/intern/particle.c
parent76ee6d3fc5dc2ce3322ed553aa418ac2613d41a3 (diff)
Fix #35407: different particle behavior compared to 2.66, reverted part of 56073.
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index b0ef6715382..4e78ab52499 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -264,12 +264,11 @@ static void psys_create_frand(ParticleSystem *psys)
{
int i;
float *rand = psys->frand = MEM_callocN(PSYS_FRAND_COUNT * sizeof(float), "particle randoms");
- RNG *rng = BLI_rng_new_srandom(psys->seed);
- for (i = 0; i < 1024; i++, rand++)
- *rand = BLI_rng_get_float(rng);
+ BLI_srandom(psys->seed);
- BLI_rng_free(rng);
+ for (i = 0; i < 1024; i++, rand++)
+ *rand = BLI_frand();
}
int psys_check_enabled(Object *ob, ParticleSystem *psys)
{
@@ -3303,11 +3302,8 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
sim.ob = ob;
sim.psys = psys;
sim.psmd = psys_get_modifier(ob, psys);
- sim.rng = BLI_rng_new(0);
psys_cache_child_paths(&sim, cfra, 1);
-
- BLI_rng_free(sim.rng);
}
/* clear recalc flag if set here */
@@ -4664,7 +4660,6 @@ void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
sim.ob = ob;
sim.psys = psys;
sim.psmd = psys_get_modifier(ob, psys);
- sim.rng = BLI_rng_new(0);
psys->lattice = psys_get_lattice(&sim);
@@ -4692,6 +4687,4 @@ void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
/* protect the applied shape */
psys->flag |= PSYS_EDITED;
}
-
- BLI_rng_free(sim.rng);
}