1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +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: case RETURN_TO_MAIN_MENU:
{ {
auto mode = client->getStartInfo()->mode; StartInfo si = *client->getStartInfo();
endGame(); if(si.mode == StartInfo::CAMPAIGN)
if(mode == StartInfo::CAMPAIGN) GH.pushInt( new CBonusSelection(si.campSt) );
GH.pushInt( new CBonusSelection(NULL) );
else else
{ {
endGame();
CGPreGame::create(); CGPreGame::create();
GH.curInt = CGP; GH.curInt = CGP;
GH.defActionsDef = 63; GH.defActionsDef = 63;

View File

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