Jelajahi Sumber

CBattleInterface: avoid freezes on end of battle. Fix issue 1897

Arseniy Shestakov 8 tahun lalu
induk
melakukan
09d593e59b
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      client/battle/CBattleInterface.cpp

+ 1 - 0
client/battle/CBattleInterface.cpp

@@ -1245,6 +1245,7 @@ void CBattleInterface::displayBattleFinished()
 	SDL_Rect temp_rect = genRect(561, 470, (screen->w - 800)/2 + 165, (screen->h - 600)/2 + 19);
 	SDL_Rect temp_rect = genRect(561, 470, (screen->w - 800)/2 + 165, (screen->h - 600)/2 + 19);
 	resWindow = new CBattleResultWindow(*bresult, temp_rect, *this->curInt);
 	resWindow = new CBattleResultWindow(*bresult, temp_rect, *this->curInt);
 	GH.pushInt(resWindow);
 	GH.pushInt(resWindow);
+	curInt->waitWhileDialog(); // Avoid freeze when AI end turn after battle. Check bug #1897
 }
 }
 
 
 void CBattleInterface::spellCast(const BattleSpellCast *sc)
 void CBattleInterface::spellCast(const BattleSpellCast *sc)