anchor.diff:    Result := False;
   end;
   
  -procedure FloodTileMapSectors(Cell: PCPFCell; Sector: PByte;
  +procedure FloodTileMapSectors(const Cell: PCPFCell; const Sector: PByte;
     const Offsets: TCPFOffsets
     {$ifdef LARGEINT}; NodeBuffers: PCPFNodeBuffers{$endif});
   label
  
positive.code:   HeuristedPoolNode.Prev := Node;
  end;
  
  procedure TTileMap.AddHeuristedNodes(const First, Last: PCPFNode);
  var
    Next: PCPFNode;
  begin
  
negative.code:     Inc(S);
    end;
  
    // actualization and flags
    Flags := NativeUInt(FCaching) xor 1;{FLAG_CACHING}
    begin
      // finish point
      if (FinishX <> Self.FActualInfo.FinishPoint.X) or
         (FinishY <> Self.FActualInfo.FinishPoint.Y) then
      begin
        Flags := Flags or FLAG_FINISH;
  
        // allocated nodes
        Inc(FActualInfo.ChangedFinishCount);
        if (FActualInfo.ChangedFinishCount = CHANGED_FINISH_INTERVAL) then
        begin
          FActualInfo.ChangedFinishCount := 0;
  
          if (FInfo.NodeAllocator.Count > 2) then
          begin
            Flags := Flags or FLAG_CLEAN;
            FreeAllocatedNodes(True);
          end else
          if (FNodes.Storage.Count > 2) then
          begin
            FreeStorageTopBuffer;
          end;
        end;
      end;
  
      // tiles + sectors
      if (FActualInfo.TilesChanged) then
      begin
        Flags := Flags or FLAG_TILES;
        FActualInfo.TilesChanged := False;
  
        if (FActualInfo.SectorsChanged) then
        begin
          Flags := Flags or FLAG_SECTORS;
          FActualInfo.SectorsChanged := False;
        end;
      end;
  
      // actualize sectors
      if (SectorTest) then
      begin
        if (FActualInfo.Sectors = nil) or (Flags and FLAG_SECTORS <> 0) then
          ActualizeSectors;
  
        FinishSector := PByte(NativeInt(FActualInfo.Sectors) +
          NativeInt(Self.Width) * Params.Finish.Y + Params.Finish.X)^;
      end else
      begin
        if (FActualInfo.Sectors <> nil) then
          CPFFreeMem(Pointer(FActualInfo.Sectors));
  
        FinishSector := SECTOR_EMPTY;
      end;
  
      // excluded points
      if (FActualInfo.Excludes.Count or Params.ExcludesCount <> 0) then
      begin
        if (not ActualizeExcludes(Params.Excludes, Params.ExcludesCount, True{Flags???})) then
          Flags := Flags or FLAG_EXCLUDED;
      end;
  
      // tile weights
      if (Params.Weights = nil) then
      begin
        if (FActualInfo.Weights.Count <> 0) then
        begin
          if (not ActualizeWeights(nil, True{Flags???})) then
            Flags := Flags or FLAG_WEIGHTS;
        end;
      end else
      if (FActualInfo.Weights.Current <> Params.Weights.FInfo) or
        (FActualInfo.Weights.UpdateId <> Params.Weights.FInfo.PrepareId) then
      begin
        if (not ActualizeWeights(Params.Weights.FInfo, True{Flags???})) then
          Flags := Flags or FLAG_WEIGHTS;
      end;
  
  
  
      // attainable points
      //???? if (not ActualCachedData) then
      //????  ReleaseAttainableNodes;
  
      // actualize finish point
     (* FActualInfo.FinishPoint.X := FinishX;
      FInfo.FinishPoint.X := FinishX;
      FActualInfo.FinishPoint.Y := FinishY;
      FInfo.FinishPoint.Y := FinishY;*)
  
      // heuristics points
      //????if (not ActualFinish) then
      //????  ReleaseHeuristedNodes;
    end;
  
    // allocate start points
    if (Params.StartsCount = 1) and (FActualInfo.Starts.Count = 1) then
    begin
    (* // S := Params.Starts;
      StartPoint := FActualInfo.Starts.Buffer.Memory;
      StartFlags := 0;//(StartPoint.X - S.X) or (StartPoint.Y - S.Y);
  
     // StartPoint.X := S.X;
     // StartPoint.Y := S.Y; *)
     (* with Params.Starts^ do
      begin
        FinishX := X;
        FinishY := Y;
      end;
  
      StartPoint := FActualInfo.Starts.Buffer.Memory;
      (*StartFlags := (StartPoint.X - FinishX) or (StartPoint.Y - FinishY);
      StartPoint.X := FinishX{S.X};
      StartPoint.Y := FinishY{S.Y};*)
  
     (* StartFlags := (StartPoint.X - FinishX);
      StartPoint.X := FinishX{S.X};
      StartFlags := StartFlags or (StartPoint.Y - FinishY);
      StartPoint.Y := FinishY; *)
  
      StartPoint := FActualInfo.Starts.Buffer.Memory;
      with Params.Starts^ do
      begin
        StartFlags := (StartPoint.X - X) or (StartPoint.Y - Y);
  
        StartPoint.X := X;
        StartPoint.Y := Y;
      end;
  
     // StartFlags := 0;
  
    end else
    begin
      StartFlags := NativeUInt(not ActualizeStarts(Params.Starts, Params.StartsCount, True{Flags???}));
    end;
  
    // path is already exists case
    if (0 = (Flags or StartFlags)) and (Byte(FActualInfo.FoundPath.FullPath) >= Byte(FullPath)) then
      goto fill_result;
  
    // new finish point
    FinishX := Params.Finish.X;
    FinishY := Params.Finish.Y;
    FActualInfo.FinishPoint.X := FinishX;
    FInfo.FinishPoint.X := FinishX;
    FActualInfo.FinishPoint.Y := FinishY;
    FInfo.FinishPoint.Y := FinishY;
  
    // basic path initialization
    FActualInfo.FoundPath.Index := 0;
  