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:
parent
3f95ba8ac8
commit
4010978a91
@ -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;
|
||||||
|
@ -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++)
|
||||||
|
Loading…
Reference in New Issue
Block a user