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

* a bit of work on campaigns

This commit is contained in:
mateuszb 2012-09-19 17:41:22 +00:00
parent 3f95ba8ac8
commit 4010978a91
2 changed files with 5 additions and 4 deletions

View File

@ -774,12 +774,12 @@ static void listenForEvents()
}*/
case RETURN_TO_MAIN_MENU:
{
auto mode = client->getStartInfo()->mode;
endGame();
if(mode == StartInfo::CAMPAIGN)
GH.pushInt( new CBonusSelection(NULL) );
StartInfo si = *client->getStartInfo();
if(si.mode == StartInfo::CAMPAIGN)
GH.pushInt( new CBonusSelection(si.campSt) );
else
{
endGame();
CGPreGame::create();
GH.curInt = CGP;
GH.defActionsDef = 63;

View File

@ -410,6 +410,7 @@ void CCampaignState::initNewCampaign( const StartInfo &si )
{
assert(si.mode == StartInfo::CAMPAIGN);
campaignName = si.mapname;
currentMap = si.campSt->currentMap;
camp = CCampaignHandler::getCampaign(campaignName);
for (ui8 i = 0; i < camp->mapPieces.size(); i++)