mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fix excessive warning - neutral town with Portal is perfectly legal
This commit is contained in:
parent
d742b6b809
commit
6ed0fbe579
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user