anchor.diff:    TreePlacePoint.Dir := dir_N; //Trees must always be planted facing north as that is the unit DAT animation that is used
     List1:=TKMPointList.Create;
     List2:=TKMPointList.Create;
  -  for i:=max(aPosition.Y-aRadius,1) to min(aPosition.Y+aRadius,MapY-1) do
  -  for k:=max(aPosition.X-aRadius,1) to min(aPosition.X+aRadius,MapX-1) do
  +  for i:=max(aPosition.Y-aRadius,1) to min(aPosition.Y+aRadius,fMapY-1) do
  +  for k:=max(aPosition.X-aRadius,1) to min(aPosition.X+aRadius,fMapX-1) do
       if (KMLength(aPosition,KMPoint(k,i))<=aRadius) and not KMSamePoint(aAvoidLoc,KMPoint(k,i)) then
         if (CanPlantTrees in Land[i,k].Passability) and Route_CanBeMade(aPosition,KMPoint(k,i),CanWalk,0,false) then begin
   
  
positive.code: begin
    //List1 is all trees within radius
    List:=TKMPointList.Create;
    for i:=max(aPosition.Y-aRadius,Ins) to min(aPosition.Y+aRadius,1+MapY-Ins) do
    for k:=max(aPosition.X-aRadius,Ins) to min(aPosition.X+aRadius,1+MapX-Ins) do
      if (KMLength(aPosition,KMPoint(k,i))<=aRadius) and not KMSamePoint(aAvoidLoc,KMPoint(k,i)) then
        if ObjectIsChopableTree(KMPoint(k,i),4)and(Land[i,k].TreeAge>=TreeAgeFull) then //Grownup tree
          if Route_CanBeMadeToVertex(aPosition,KMPoint(k,i),CanWalk) then
  
negative.code: TTerrain = class
    private
      fAnimStep:integer;
      fMapX,fMapY:integer; //Terrain width and height
    public
  
      Land:array[1..MAX_MAP_SIZE,1..MAX_MAP_SIZE]of record
        Terrain:byte;
  