Random number generator: replace a bunch of usage of the global random number
[blender.git] / source / blender / modifiers / intern / MOD_particleinstance.c
index 63dcb5d942d18267916286feaa25f6c7e229af2e..8a6a83b65b2de02214d5de1cfbf507e90b076202 100644 (file)
@@ -313,8 +313,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                        {
                                float ran = 0.0f;
                                if (pimd->random_position != 0.0f) {
-                                       BLI_srandom(psys->seed + p);
-                                       ran = pimd->random_position * BLI_frand();
+                                       ran = pimd->random_position * BLI_hash_frand(psys->seed + p);
                                }
 
                                if (pimd->flag & eParticleInstanceFlag_KeepShape) {