Explorar o código

Paint native terrain in zones.

DjWarmonger %!s(int64=11) %!d(string=hai) anos
pai
achega
3a6f748fb5
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      lib/rmg/CRmgTemplateZone.cpp

+ 3 - 0
lib/rmg/CRmgTemplateZone.cpp

@@ -368,6 +368,9 @@ bool CRmgTemplateZone::fill(CMapGenerator* gen)
 			playerInfo.posOfMainTown = town->pos - int3(2, 0, 0);
 			playerInfo.generateHeroAtMainTown = true;
 
+			gen->editManager->getTerrainSelection().selectRange(MapRect(shape[0], shape[2].y - shape[0].y, shape[2].x - shape[0].x));
+			gen->editManager->drawTerrain(VLC->townh->factions[townId]->nativeTerrain, &gen->rand);
+
 			//required_objects.push_back(town);
 
 			std::vector<Res::ERes> required_mines;