diff --git a/client/CMT.cpp b/client/CMT.cpp index a4faa7bf8..2cb3349f1 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -1281,6 +1281,7 @@ static void handleEvent(SDL_Event & ev) } else { + boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); //TODO: thread sync and execute this after server closes finisher(); } } diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index e3eba0c9e..29d448661 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -2469,14 +2469,9 @@ void CPlayerInterface::requestReturningToMainMenu(bool won) { CCS->soundh->ambientStopAllChannels(); if(won && cb->getStartInfo()->campState) - { - CSH->state = EClientState::DISCONNECTING; // do not close server, it's not intended for campaign continuation CSH->startCampaignScenario(cb->getStartInfo()->campState); - } else - { sendCustomEvent(EUserEvent::RETURN_TO_MAIN_MENU); - } } void CPlayerInterface::sendCustomEvent( int code )