Fix for weather effects not showing up correctly on OSX/Linux

due to RAND_MAX issues