1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merge pull request #3645 from vcmi/save_rmg_options

Save rmg options
This commit is contained in:
DjWarmonger
2024-03-14 19:54:08 +01:00
committed by GitHub
16 changed files with 264 additions and 153 deletions

View File

@@ -156,6 +156,16 @@ void CLobbyScreen::startCampaign()
void CLobbyScreen::startScenario(bool allowOnlyAI)
{
if (tabRand && CSH->si->mapGenOptions)
{
// Save RMG settings at game start
tabRand->saveOptions(*CSH->si->mapGenOptions);
}
// Save chosen difficulty
Settings lastDifficulty = settings.write["general"]["lastDifficulty"];
lastDifficulty->Integer() = getCurrentDifficulty();
if (CSH->validateGameStart(allowOnlyAI))
{
CSH->sendStartGame(allowOnlyAI);