فهرست منبع

Fix all common victory/defeat crashes

Dydzio 6 سال پیش
والد
کامیت
492d6504b4
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);
 		}