diff --git a/Source/Form/Util/Researcher.cpp b/Source/Form/Util/Researcher.cpp index 522de4f1..92996e8c 100644 --- a/Source/Form/Util/Researcher.cpp +++ b/Source/Form/Util/Researcher.cpp @@ -46,17 +46,13 @@ static std::vector getStates(RNGType rng, u32 initial, u32 max) { std::vector states; - if constexpr (std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value - || std::is_same::value) + if constexpr (std::is_same::value || std::is_same::value) { - rng.jump(initial); + rng.advance(initial); } else { - rng.advance(initial); + rng.jump(initial); } for (u32 i = 0; i < max; i++) @@ -122,8 +118,16 @@ Researcher::Researcher(QWidget *parent) : QWidget(parent), ui(new Ui::Researcher customs.erase(customs.begin()); } - customs.emplace_back(toInt(Custom::Custom1) + i - 1); - customs.emplace_back(toInt(Custom::Previous1) + i - 1); + if (i == 1) + { + customs.emplace_back(toInt(Custom::Custom1) + i - 1); + customs.emplace_back(toInt(Custom::Previous1) + i - 1); + } + else + { + customs.insert(std::find(customs.begin(), customs.end(), toInt(Custom::Custom1) + i - 2) + 1, toInt(Custom::Custom1) + i - 1); + customs.emplace_back(toInt(Custom::Previous1) + i - 1); + } } connect(ui->pushButtonGenerate, &QPushButton::clicked, this, &Researcher::generate);