浏览代码

Merge pull request #1720 from vcmi/fix_small_lakes_clean

Don't place shipyard or boats at very small lakes
Andrii Danylchenko 2 年之前
父节点
当前提交
23fa7c4a9b
共有 1 个文件被更改,包括 7 次插入0 次删除
  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>())