anchor.diff:    KM_CommonClasses, KM_CommonTypes, KM_Defaults, KM_Points,
     KM_Units, KM_UnitGroups,
     KM_NavMesh, KM_NavMeshInfluences,
  -  KM_NavMeshFloodFill;
  +  KM_NavMeshFloodFill, KM_FloodFill;
   
   
   const
  
positive.code:     for Y := 1 to fMapY - 1 do
      for X := 1 to fMapX - 1 do
      begin
        cnt := MAX_ELEMENTS;
        for Y0 := Max(1, Y - RAD) to Min(Y + RAD, fMapY - 1) do
        for X0 := Max(1, X - RAD) to Min(X + RAD, fMapX - 1) do
  
negative.code:       begin
          for Y2 := aY to Min(fMapY-1,aY+1) do
          for X2 := Max(1,aX-2) to Min(fMapX-1,aX+1+Byte(aHT = htIronMine)) do
            AvoidBuilding[Y2, X2] := AVOID_BUILDING_MINE_TILE;
          Exit;
        end;
    end;
  
    procedure InitReachableArea();
    var
      PL: TKMHandIndex;
      I: Integer;
      MinP, MaxP: TKMPoint;
      CenterPoints: TKMPointArray;
      RoadableFF: TKKRoadableFF;
    begin
      if (Length(AvoidBuilding) = 0) then
        Exit;
      MinP := KMPoint(1,1);
      MaxP := KMPoint(High(AvoidBuilding[0]), High(AvoidBuilding));
      RoadableFF := TKKRoadableFF.Create(MinP, MaxP, AvoidBuilding, False);
      try
        for PL := 0 to gHands.Count - 1 do
        begin
          gAIFields.Eye.OwnerUpdate(PL);
          CenterPoints := gAIFields.Eye.GetCityCenterPoints(True);
          for I := 0 to Length(CenterPoints) - 1 do
            RoadableFF.QuickFlood(CenterPoints[I].X, CenterPoints[I].Y);
        end;
      finally
        RoadableFF.Free;
      end;
    end;
  var
    H: TKMHouse;
    I,X,Y: Integer;
  begin
    for Y := 1 to fMapY - 1 do
    for X := 1 to fMapX - 1 do
      if gRes.Tileset.TileIsRoadable( gTerrain.Land[Y,X].Terrain ) then
        AvoidBuilding[Y,X] := AVOID_BUILDING_INACCESSIBLE_TILES
      else
        AvoidBuilding[Y,X] := 0;
    InitReachableArea();
  
    //Avoid areas where Gold/Iron mines should be
    for Y := 3 to fMapY - 2 do
  