My son is currently playing with a new feature that can make the camera shake like in an earthquake. While doing so he wanted to use random numbers and he used RandomGen.
In a method he did :
{
RandomGen randgen;
myRandom=randgen.randRange(0,max);
}
This always results in the same number! When I told him, and he printed out the number to see it, he told me that there are other places in the code where it is used like this ( Maybe I did one of this? )
Places that don't look good to me are:
properties.cpp line 482
and maybe worse:
ai_interaface.cpp line 679
in bool AiInterface::isResourceInRegion(const Vec2i &pos, const ResourceType *rt, Vec2i &resourcePos, int range) const { ....
Do these places give the wanted behaviour?