anchor.diff:  interface
   uses
     Math, KM_CommonTypes, KM_Points,
  -  BinaryHeap, KM_NavMesh;
  +  BinaryHeap, KM_Defaults;
   
   
   type
  +  TPathfindingMode = ( pm_ShortestWay,   // Find shortest way in NavMesh
  +                       pm_AvoidTraffic,  // Try avoid traffic
  +                       pm_AvoidSpecEnemy // Try avoid anti type units (cav will keep distance form spears etc)
  +                     );
  +
     TNavMeshNode = class
  -    Idx,CostTo,Estim: Word; // Index of navMeshNode in navmesh, cost to this navMeshNode, estimated cost from navMeshNode to end
  +    Idx,Estim: Word; // Index of navMeshNode in navmesh, estimated cost from navMeshNode to end
  +    CostTo: Longword; // Cost to Idx navMeshNode
       Point: TKMPoint; // Point in navMeshNode of navmesh (each triangle [created by points in navMeshNode] have its point -> multiple poits will create path)
       Parent: TNavMeshNode; // Parent navMeshNode
     end;
  
positive.code:     DX := Abs(aSPoint.X - aEPoint.X);
      DY := Abs(aSPoint.Y - aEPoint.Y);
      if (DX > DY) then
        Output := (DX shl 3) + (DY shl 2)
      else
        Output := (DY shl 3) + (DX shl 2);
    end;
    // Output := KMDistanceAbs(SPoint, EPoint); // in test map it throws +1 cycle (109 vs 110 interactions
    Result := Output;
  end;
  
  
negative.code:   DX := Abs(SPoint.X - EPoint.X);
    DY := Abs(SPoint.Y - EPoint.Y);
    if (DX > DY) then
      Output := (DX * 10) + (DY * 4)
    else
      Output := (DY * 10) + (DX * 4);
    Result := Output;
  end;
  
  