anchor.diff:    for k:=max(aPosition.X-aRadius,Ins) to min(aPosition.X+aRadius,MapX-Ins) do
       if (KMLength(aPosition,KMPoint(k,i))<=aRadius) then
         if ObjectIsChopableTree(KMPoint(k,i),4)and(Land[i,k].TreeAge>=TreeAgeFull) then //Grownup tree
  -        if Route_CanBeMadeToVertex(aPosition,KMPoint(k,i),canWalk,0) then
  +        if Route_CanBeMadeToVertex(aPosition,KMPoint(k,i),canWalk) then
             List.AddEntry(KMPoint(k,i));
   
     TreeLoc := List.GetRandom; //Choose our tree
  
positive.code:   if aPass <> canWalkAvoid then //As canWalkAvoid is never set as a passability there is no need to check it
    begin
      Result := Result and CheckPassability(LocA,aPass);
      if aWalkToSpot=0 then
        Result := Result and CheckPassability(LocB,aPass)
      else
        for i:=LocB.Y-aWalkToSpot to LocB.Y+aWalkToSpot do for k:=LocB.X-aWalkToSpot to LocB.X+aWalkToSpot do
          if fTerrain.TileInMapCoords(k,i) then
          if GetLength(LocB,KMPoint(k,i))<=aWalkToSpot then
            Result := Result or CheckPassability(KMPoint(k,i),aPass);
    end;
  
    //There's a walkable way between A and B (which is proved by FloodFill test on map init)
    if aPass=canWalk then
    begin
      if aWalkToSpot=0 then //Check WalkConnect for surrounding tiles if we are not walking to spot
        Result := Result and (Land[LocA.Y,LocA.X].WalkConnect[1] = Land[LocB.Y,LocB.X].WalkConnect[1])
      else
        for i:=LocB.Y-aWalkToSpot to LocB.Y+aWalkToSpot do for k:=LocB.X-aWalkToSpot to LocB.X+aWalkToSpot do
          if fTerrain.TileInMapCoords(k,i) then
          if GetLength(LocB,KMPoint(k,i))<=aWalkToSpot then
            Result := Result or (Land[LocA.Y,LocA.X].WalkConnect[1] = Land[i,k].WalkConnect[1]);
    end;
  
    if aPass=canWalkRoad then
      if aWalkToSpot=0 then //Check WalkConnect for surrounding tiles if we are not walking to spot
        Result := Result and (Land[LocA.Y,LocA.X].WalkConnect[2] = Land[LocB.Y,LocB.X].WalkConnect[2])
      else
        for i:=LocB.Y-aWalkToSpot to LocB.Y+aWalkToSpot do for k:=LocB.X-aWalkToSpot to LocB.X+aWalkToSpot do
          if fTerrain.TileInMapCoords(k,i) then
          if GetLength(LocB,KMPoint(k,i))<=aWalkToSpot then
            Result := Result or (Land[LocA.Y,LocA.X].WalkConnect[2] = Land[i,k].WalkConnect[2]);
  
    if aPass=canFish then
      Result := Result and (Land[LocA.Y,LocA.X].WalkConnect[3] = Land[LocB.Y,LocB.X].WalkConnect[3]);
  
    if aPass=canWalkAvoid then
    begin
      Result := Result and (Land[LocA.Y,LocA.X].WalkConnect[4] = Land[LocB.Y,LocB.X].WalkConnect[4]);
      if aWalkToSpot>0 then //Check WalkConnect for surrounding tiles if we are not walking to spot
        for i:=LocB.Y-aWalkToSpot to LocB.Y+aWalkToSpot do for k:=LocB.X-aWalkToSpot to LocB.X+aWalkToSpot do
          if fTerrain.TileInMapCoords(k,i) then
          if GetLength(LocB,KMPoint(k,i))<=aWalkToSpot then
            Result := Result or (Land[LocA.Y,LocA.X].WalkConnect[4] = Land[i,k].WalkConnect[4]);
    end;
  end;
  
  
  function TTerrain.Route_CanBeMadeToVertex(LocA, LocB:TKMPoint; aPass:TPassability; aWalkToSpot:byte):boolean;
  var i,k:integer;
  begin
    //Check if a route can be made to this vertex, from any direction (used for woodcutter cutting trees)
  
negative.code: end;
  
  
  //Test wherever it is possible to make the route without actually making it to save performance
  function TTerrain.Route_CanBeMade(LocA, LocB:TKMPoint; aPass:TPassability; aWalkToSpot:byte):boolean;
  var i,k:integer; aHouse:TKMHouse; TestRadius:boolean;
  begin
    Result := true;
  
    //target has to be different point than source
    //Result:=not (KMSamePoint(LocA,LocB)); //Or maybe we don't care
  
    //If we are in worker mode then use the house entrance passability if we are still standing in a house
    if aPass=canWorker then
    begin
  