diff --git a/src/modules/math/RandomGenerator.cpp b/src/modules/math/RandomGenerator.cpp index 89c7f73f7..6f1a7277b 100644 --- a/src/modules/math/RandomGenerator.cpp +++ b/src/modules/math/RandomGenerator.cpp @@ -104,6 +104,8 @@ void RandomGenerator::setSeed(RandomGenerator::Seed newseed) } while (newseed.b64 == 0); rng_state = newseed; + + last_randomnormal = std::numeric_limits::infinity(); } RandomGenerator::Seed RandomGenerator::getSeed() const @@ -129,6 +131,8 @@ void RandomGenerator::setState(const std::string &statestr) throw love::Exception("Invalid random state: %s", statestr.c_str()); rng_state = state; + + last_randomnormal = std::numeric_limits::infinity(); } std::string RandomGenerator::getState() const