anchor.diff:  uses SysUtils, Math, KromUtils, KM_PathFinding,
     KM_CommonClasses, KM_Defaults, KM_Terrain, KM_Points, BinaryHeap;
   
  -
  -{$DEFINE USEDNODES} //Optimize array reset
   
   type
     TANode = class
  
positive.code: 
  procedure TPathFindingAStarNew.Reset;
  var
    I,K: Integer;
  begin
    {$IFNDEF USEDNODES}
    for I := 0 to High(fOpenRef) do
    for K := 0 to High(fOpenRef[I]) do
    if fOpenRef[I,K] <> nil then
    begin
      fOpenRef[I,K].Free;
      fOpenRef[I,K] := nil;
    end;
    {$ENDIF}
  
    {$IFDEF USEDNODES}
    //Reverse seems to work ~10% faster (cos of cache access probably)
    for I := fUsedNodeCount - 1 downto 0 do
    begin
  
negative.code:     fHeap: TBinaryHeap;
      fMinN: TANode;
      fOpenRef: array of array of TANode; //References to OpenList, Sized as map
      fUsedNodes: array of TANode; //Used to make Reset more efficient
      fUsedNodeCount: Integer;
      function HeapCmp(A,B: Pointer): Boolean;
      function GetNodeAt(X,Y: SmallInt): TANode;
      procedure Reset;
  