anchor.diff:    var
       Polygon: Word;
       I,K,L: Integer;
  -    SqrDist, SqrClosestDist, SqrClosestDistToRanged: Single;
  +    SqrDist, SqrClosestDist, SqrClosestDistToRanged, CloseCombatProtection: Single;
       GT: TKMGroupType;
       Squad: TAISquad;
       GroupsInFightArr: TKMUnitGroupArray;
  
positive.code:         // Position
          Position := Squad.Position;
          gRenderAux.CircleOnTerrain(Position.X, Position.Y, 1, 0, $99000000 OR COLOR_GREEN);
          // Target house
          if (Squad.TargetHouse <> nil) then
            if not Squad.TargetHouse.IsDestroyed then
            begin
              gRenderAux.LineOnTerrain(Position, Squad.TargetHouse.GetPosition, $99000000 OR COLOR_RED);
              if (Length(Squad.PointPath) > 0) then
                for J := Length(Squad.PointPath)-2 downto 0 do
                  gRenderAux.LineOnTerrain(Squad.PointPath[J+1], Squad.PointPath[J], $60000000 OR COLOR_BLUE);
            end;
          // Target unit
          if (Squad.TargetUnit <> nil) then
            if not Squad.TargetUnit.IsDeadOrDying then
            begin
              gRenderAux.LineOnTerrain(Position, Squad.TargetUnit.GetPosition, $99000000 OR COLOR_RED);
              if (Length(Squad.PointPath) > 0) then
                for J := Length(Squad.PointPath)-2 downto 0 do
                  gRenderAux.LineOnTerrain(Squad.PointPath[J+1], Squad.PointPath[J], $60000000 OR COLOR_BLUE);
  
negative.code:     FinPos := FinalPosition.Loc;
      if PlanPath(ActPos, FinPos, False) then
        Group.OrderWalk(FinPos, True, wtokAISquad, FinalPosition.Dir)
      else if not KMSamePoint(Group.Position, FinalPosition.Loc) then // Dont repeat order and let archers fire
        Group.OrderWalk(FinalPosition.Loc, True, wtokAISquad, FinalPosition.Dir);
    end;
  end;
  