mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
- Fixed starting another map from campaign bonus selection screen while playing a campaign mission
This commit is contained in:
@@ -89,6 +89,7 @@ void playIntro();
|
||||
static void listenForEvents();
|
||||
//void requestChangingResolution();
|
||||
void startGame(StartInfo * options, CConnection *serv = nullptr);
|
||||
void endGame();
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef _GNU_SOURCE
|
||||
@@ -856,17 +857,6 @@ static void listenForEvents()
|
||||
}
|
||||
else if(ev.type == SDL_USEREVENT)
|
||||
{
|
||||
auto endGame = []
|
||||
{
|
||||
client->endGame();
|
||||
vstd::clear_pointer(client);
|
||||
|
||||
delete CGI->dobjinfo.get();
|
||||
const_cast<CGameInfo*>(CGI)->dobjinfo = new CDefObjInfoHandler;
|
||||
|
||||
const_cast<CGameInfo*>(CGI)->modh->reload(); //add info about new creatures to dobjinfo
|
||||
};
|
||||
|
||||
switch(ev.user.code)
|
||||
{
|
||||
case RETURN_TO_MAIN_MENU:
|
||||
@@ -954,6 +944,17 @@ void startGame(StartInfo * options, CConnection *serv/* = nullptr*/)
|
||||
client->connectionHandler = new boost::thread(&CClient::run, client);
|
||||
}
|
||||
|
||||
void endGame()
|
||||
{
|
||||
client->endGame();
|
||||
vstd::clear_pointer(client);
|
||||
|
||||
delete CGI->dobjinfo.get();
|
||||
const_cast<CGameInfo*>(CGI)->dobjinfo = new CDefObjInfoHandler;
|
||||
|
||||
const_cast<CGameInfo*>(CGI)->modh->reload(); //add info about new creatures to dobjinfo
|
||||
}
|
||||
|
||||
void handleQuit()
|
||||
{
|
||||
auto quitApplication = []()
|
||||
|
||||
Reference in New Issue
Block a user