瀏覽代碼

Hackfix for campaigns

Dydzio 6 年之前
父節點
當前提交
2b6fe9298a
共有 2 個文件被更改,包括 1 次插入5 次删除
  1. 1 0
      client/CMT.cpp
  2. 0 5
      client/CPlayerInterface.cpp

+ 1 - 0
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();
 				}
 			}

+ 0 - 5
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 )