Browse Source

Fix for previous commit.

DjWarmonger 11 years ago
parent
commit
8a8cda950d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/rmg/CRmgTemplateZone.cpp

+ 3 - 3
lib/rmg/CRmgTemplateZone.cpp

@@ -820,7 +820,7 @@ void CRmgTemplateZone::initTownType (CMapGenerator* gen)
 				//register MAIN town of zone
 				gen->registerZone(town->subID);
 				//first town in zone goes in the middle
-				placeObject(gen, town, getPos() + town->getVisitableOffset());
+				placeAndGuardObject(gen, town, getPos() + town->getVisitableOffset(), 0);
 			}
 			else
 				addRequiredObject (town);
@@ -850,8 +850,8 @@ void CRmgTemplateZone::initTownType (CMapGenerator* gen)
 			town->tempOwner = player;
 			town->builtBuildings.insert(BuildingID::FORT);
 			town->builtBuildings.insert(BuildingID::DEFAULT);
-			placeObject(gen, town, getPos() + town->getVisitableOffset()); //towns are big objects and should be centered around visitable position
-			guardObject(gen, town, 0); //generate no guards, but free path to entrance
+			//towns are big objects and should be centered around visitable position
+			placeAndGuardObject(gen, town, getPos() + town->getVisitableOffset(), 0); //generate no guards, but free path to entrance
 
 			totalTowns++;
 			//register MAIN town of zone only