anchor.diff:            if (P[Y,X] > Probability) then
               P[Y,X] := Probability;
           end;
  -  end;
  -
  -  // Calculate probability of all obstacles from RMGSettings (obstacles are selected by random number in interval <0,1) )
  +    // Set zero probability for shapes which are used by resources and protected radius around them
  +    for Y := Low(P) to High(P) do
  +      for X := Low(P[Y]) to High(P[Y]) do
  +        if (aCountArr[Y,X] = 0) then
  +          P[Y,X] := 0;
  +  end;
  +
  +// Calculate probability of all obstacles from RMGSettings (obstacles are selected by random number in interval <0,1) )
     Factor := 0;
     for Obstacle := Low(TObstacleType) to High(TObstacleType) do
       Factor := Factor + Trunc(RMGSettings.Obstacle.Ratio[ Obstacle ]);
  
positive.code:   end;
  
  // Linear connection is too ugly -> generate several random points in map and create linear connection between those points and player Loc
    procedure ConnectLocs(aLocs: TKMPointArray; var P: TSingle2Array);
    const
      POINT_RADIUS = 10;
      MAX_ATTEMPTS = 15;
  
negative.code:   end;
  
  var
     Rotation: Byte;
     Terrain: Word;
     X1,X2,Y1,Y2,sum,I,K,L, MaxLen: Integer;
     S,S2: TInteger2Array;
     BalanceResArr: TInteger2Array;
     TileFloodSearch: TKMTileFloodSearch;
  