1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

RMG will now actually use all the settings from pregame. Till now it did not.

This commit is contained in:
DjWarmonger 2014-07-15 16:44:07 +02:00
parent ca7fe822eb
commit e8580229dc
2 changed files with 6 additions and 0 deletions

View File

@ -881,6 +881,9 @@ void CSelectionScreen::startScenario()
if(sInfo.mapGenOptions) if(sInfo.mapGenOptions)
{ {
//copy settings from interface to actual options. TODO: refactor, it used to have no effect at all -.-
sInfo.mapGenOptions = std::shared_ptr<CMapGenOptions>(new CMapGenOptions(randMapTab->getMapGenOptions()));
// Update player settings for RMG // Update player settings for RMG
for(const auto & psetPair : sInfo.playerInfos) for(const auto & psetPair : sInfo.playerInfos)
{ {

View File

@ -177,6 +177,9 @@ const std::map<std::string, CRmgTemplate *> & CMapGenOptions::getAvailableTempla
void CMapGenOptions::finalize(CRandomGenerator & rand) void CMapGenOptions::finalize(CRandomGenerator & rand)
{ {
logGlobal->infoStream() << boost::format ("RMG settings: players %d, teams %d, computer players %d, computer teams %d, water %d, monsters %d")
% playerCount % teamCount % compOnlyPlayerCount % compOnlyTeamCount % waterContent % monsterStrength;
if(!mapTemplate) if(!mapTemplate)
{ {
mapTemplate = getPossibleTemplate(rand); mapTemplate = getPossibleTemplate(rand);