1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fix excessive warning - neutral town with Portal is perfectly legal

This commit is contained in:
Ivan Savenko 2023-06-16 19:12:07 +03:00
parent d742b6b809
commit 6ed0fbe579

View File

@ -1637,10 +1637,11 @@ static bool evntCmp(const CMapEvent &a, const CMapEvent &b)
void CGameHandler::setPortalDwelling(const CGTownInstance * town, bool forced=false, bool clear = false) void CGameHandler::setPortalDwelling(const CGTownInstance * town, bool forced=false, bool clear = false)
{// bool forced = true - if creature should be replaced, if false - only if no creature was set {// bool forced = true - if creature should be replaced, if false - only if no creature was set
const PlayerState * p = getPlayerState(town->tempOwner); const PlayerState * p = getPlayerState(town->tempOwner);
if (!p) if (!p)
{ {
logGlobal->warn("There is no player owner of town %s at %s", town->getNameTranslated(), town->pos.toString()); assert(town->tempOwner == PlayerColor::NEUTRAL);
return; return;
} }