anchor.diff:  
   
   
  -
  -
  +{ TKKRoadableFF }
  +constructor TKKRoadableFF.Create(aMinLimit, aMaxLimit: TKMPoint; var aSearchArr: TKMByte2Array; const aScanEightTiles: Boolean = False);
  +begin
  +  inherited Create(aScanEightTiles);
  +  fVisitIdx := High(Byte);
  +  fSearchArr := aSearchArr;
  +  fMinLimit := aMinLimit;
  +  fMaxLimit := aMaxLimit;
  +  SetLength(fVisitArr, Length(fSearchArr), Length(fSearchArr[0]));
  +end;
  +
  +
  +procedure TKKRoadableFF.MakeNewQueue();
  +var
  +  X,Y: Integer;
  +begin
  +  if (fVisitIdx >= High(Byte) - 1) then
  +  begin
  +    fVisitIdx := 0;
  +    for Y := Low(fVisitArr) to High(fVisitArr) do
  +      for X := Low(fVisitArr[Y]) to High(fVisitArr[Y]) do
  +        fVisitArr[Y,X] := 0;
  +  end;
  +  fVisitIdx := fVisitIdx + 1;
  +  inherited MakeNewQueue();
  +end;
  +
  +
  +function TKKRoadableFF.CanBeVisited(const aX,aY: SmallInt): Boolean;
  +begin
  +  Result := gRes.Tileset.TileIsRoadable( gTerrain.Land[aY,aX].Terrain );
  +end;
  +
  +
  +function TKKRoadableFF.IsVisited(const aX,aY: SmallInt): Boolean;
  +begin
  +  Result := fVisitArr[aY,aX] = fVisitIdx;
  +end;
  +
  +
  +procedure TKKRoadableFF.MarkAsVisited(const aX,aY: SmallInt);
  +begin
  +  fVisitArr[aY,aX] := fVisitIdx;
  +  fSearchArr[aY,aX] := 0;
  +end;
   
   
   end.
  
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:   KM_CommonClasses, KM_CommonTypes, KM_Defaults, KM_Points,
    KM_Units, KM_UnitGroups,
    KM_NavMesh, KM_NavMeshInfluences,
    KM_NavMeshFloodFill, KM_FloodFill;
  
  
  const
  