Try to init town.difficulty: set it by default to scenario.difficulty

This commit is contained in:
Laurent Alonso(fr)
2020-05-24 19:21:44 +02:00
committed by Celtic Minstrel
parent 2738a6ca3a
commit 4881471f20
2 changed files with 6 additions and 1 deletions

View File

@@ -264,7 +264,10 @@ bool load_party_v1(fs::path file_to_load, cUniverse& real_univ, bool town_restor
}
}
}
else univ.party.town_num = 200;
else {
univ.party.town_num = 200;
univ.town.difficulty = univ.scenario.difficulty;
}
}
real_univ = std::move(univ);

View File

@@ -1393,6 +1393,8 @@ void cUniverse::enter_scenario(const std::string& name) {
for(auto& m : sector->maps)
m.reset();
// time to init the town's difficulty
town.difficulty = scenario.difficulty;
party.scen_name = name;
}