Browse Source

CGDwelling: dont set owner for Refugee Camp. Fix issue 2029

Arseniy Shestakov 9 years ago
parent
commit
d4524c2fbd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/mapObjects/CGTownInstance.cpp

+ 2 - 1
lib/mapObjects/CGTownInstance.cpp

@@ -109,7 +109,8 @@ void CGDwelling::onHeroVisit( const CGHeroInstance * h ) const
 		return;
 	}
 
-	if(!relations  &&  ID != Obj::WAR_MACHINE_FACTORY)
+	// TODO this shouldn't be hardcoded
+	if(!relations && ID != Obj::WAR_MACHINE_FACTORY && ID != Obj::REFUGEE_CAMP)
 	{
 		cb->setOwner(this, h->tempOwner);
 	}