Selaa lähdekoodia

Merge pull request #1720 from vcmi/fix_small_lakes_clean

Don't place shipyard or boats at very small lakes
Andrii Danylchenko 2 vuotta sitten
vanhempi
sitoutus
23fa7c4a9b
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7 0
      lib/rmg/WaterProxy.cpp

+ 7 - 0
lib/rmg/WaterProxy.cpp

@@ -142,6 +142,13 @@ RouteInfo WaterProxy::waterRoute(Zone & dst)
 				dst.areaPossible().subtract(lake.neighbourZones[dst.getId()]);
 				continue;
 			}
+
+			//Don't place shipyard or boats on the very small lake
+			if (lake.area.getTiles().size() < 25)
+			{
+				logGlobal->info("Skipping very small lake at zone %d", dst.getId());
+				continue;
+			}
 						
 			int zoneTowns = 0;
 			if(auto * m = dst.getModificator<TownPlacer>())