2
0
Эх сурвалжийг харах

Merge pull request #1720 from vcmi/fix_small_lakes_clean

Don't place shipyard or boats at very small lakes
Andrii Danylchenko 2 жил өмнө
parent
commit
23fa7c4a9b

+ 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>())