|
@@ -2467,12 +2467,16 @@ void CPlayerInterface::showShipyardDialogOrProblemPopup(const IShipyard *obj)
|
|
|
|
|
|
void CPlayerInterface::requestReturningToMainMenu(bool won)
|
|
|
{
|
|
|
- CSH->state = EClientState::DISCONNECTING;
|
|
|
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 )
|