1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +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
commit 76e913f76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;