minor fixes
This commit is contained in:
@ -685,6 +685,13 @@ void TetrisApp::Impl::runLoop()
|
||||
challengeClearFxOrder.push_back(idx);
|
||||
}
|
||||
}
|
||||
// Seed FX RNG deterministically from the game's challenge seed so animations
|
||||
// are reproducible per-run and per-level. Fall back to a random seed if game absent.
|
||||
if (game) {
|
||||
challengeClearFxRng.seed(game->getChallengeSeedBase() + static_cast<uint32_t>(nextLevel));
|
||||
} else {
|
||||
challengeClearFxRng.seed(std::random_device{}());
|
||||
}
|
||||
std::shuffle(challengeClearFxOrder.begin(), challengeClearFxOrder.end(), challengeClearFxRng);
|
||||
|
||||
challengeClearFxElapsedMs = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user