mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Hackfix for campaigns
This commit is contained in:
parent
97869fc36f
commit
2b6fe9298a
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user