﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	phab_field
3578	[PATCH] Seed random sounds	Thomas		"Visual Actors now use the same seed for every sound.

Closes #1786.

Before using the random function it uses srand() with the actor id to seed the random function. I also made changes to rand.cpp. Apparently the first value returned by rand() is very dependent on the seed (see [http://stackoverflow.com/questions/8599238/random-number-generation-in-c-first-number-not-very-random]). Most actors were returning the same random value as they have similar seeds. Using modulo instead of dividing uses the least significant bits of the random value, yielding better results.

This is my first patch, so please tell me if I'm doing something wrong."	defect	new	Should Have	Alpha 19	Core engine		review patch		
