Przeglądaj źródła

Fix excessive warning - neutral town with Portal is perfectly legal

Ivan Savenko 2 lat temu
rodzic
commit
6ed0fbe579
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      server/CGameHandler.cpp

+ 2 - 1
server/CGameHandler.cpp

@@ -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)
 {// bool forced = true - if creature should be replaced, if false - only if no creature was set
+
 	const PlayerState * p = getPlayerState(town->tempOwner);
 	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;
 	}