소스 검색

Merge pull request #605 from vcmi/VictoryDefeatCrashFix

Fix all common victory/defeat crashes
Alexander Shishkin 6 년 전
부모
커밋
c2ad0e67de
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      client/CPlayerInterface.cpp

+ 2 - 0
client/CPlayerInterface.cpp

@@ -2175,11 +2175,13 @@ void CPlayerInterface::gameOver(PlayerColor player, const EVictoryLossCheckResul
 		if (victoryLossCheckResult.victory() && LOCPLINT == this)
 		{
 			// end game if current human player has won
+			CSH->sendClientDisconnecting();
 			requestReturningToMainMenu(true);
 		}
 		else if(CSH->howManyPlayerInterfaces() == 1 && !settings["session"]["spectate"].Bool())
 		{
 			//all human players eliminated
+			CSH->sendClientDisconnecting();
 			requestReturningToMainMenu(false);
 		}