Fixes Atlas crashing when random map generator fails, load the blank map for now.

This was SVN commit r10939.
This commit is contained in:
historic_bruno 2012-01-21 00:53:34 +00:00
parent 23959ec119
commit 8fabaa4f8c

View File

@ -101,6 +101,17 @@ QUERYHANDLER(GenerateMap)
// Cancel loading
LDR_Cancel();
// Since map generation failed and we don't know why, use the blank map as a fallback
InitGame();
ScriptInterface& si = g_Game->GetSimulation2()->GetScriptInterface();
CScriptValRooted atts;
si.Eval("({})", atts);
si.SetProperty(atts.get(), "mapType", std::string("scenario"));
si.SetProperty(atts.get(), "map", std::wstring(L"_default"));
StartGame(atts);
msg->status = -1;
}
}