1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #599 from dydzio0614/NoTownWarningFix

Do not display "you have no towns" warning if player already lost
This commit is contained in:
Alexander Shishkin
2019-05-29 17:49:55 +03:00
committed by GitHub

View File

@@ -2390,7 +2390,7 @@ void CGameHandler::setOwner(const CGObjectInstance * obj, PlayerColor owner)
if (oldOwner < PlayerColor::PLAYER_LIMIT) //old owner is real player
{
if (getPlayer(oldOwner)->towns.empty()) //previous player lost last last town
if (getPlayer(oldOwner)->towns.empty() && getPlayer(oldOwner)->status != EPlayerStatus::LOSER) //previous player lost last last town
{
InfoWindow iw;
iw.player = oldOwner;