anchor.diff:  end;
   
   
  +// Queue is realised inside of array (constant length) instead of interconnected elements
   procedure TNavMeshFloodFill.ClearVisitIdx();
   var
     I: Word;
  
positive.code: end;
  
  
  procedure TNavMeshFloodFill.Flood();
  var
    PolyArr: TPolygonArray;
    I, Idx, NearbyIdx: Word;
    Point: TKMPoint;
  begin
    PolyArr := gAIFields.NavMesh.Polygons;
  
negative.code: var
    I, ActIdx, PrevIdx: Word;
  begin
    // Empty queue
    if IsQueueEmpty then
    begin
      fStartQueue := aIdx;
      fEndQueue := fStartQueue;
    end
    // Insert in sorted array
    else
    begin
      PrevIdx := fStartQueue;
      ActIdx := fStartQueue;
      // Find the right position
      I := 0;
      while (I < fQueueCnt) do // While must be here
      begin
  