anchor.diff:        for I := 0 to Locs.Count - 1 do
         begin
           for Y := Max(1,Locs.Items[I].Y-SCAN_RAD) to Min(Locs.Items[I].Y+SCAN_RAD,gTerrain.MapY-1) do
  -        for X := Max(1,Locs.Items[I].X-SCAN_RAD) to Min(Locs.Items[I].X+SCAN_RAD,gTerrain.MapX-1) do
  -        begin
  -          Loc := KMPoint(X,Y);
  -          if gAIFields.Eye.CanAddHousePlan(Loc, htQuary, False, False) then
  -          begin
  -            Bid := + DistCrit(htQuary, Loc) * 40 + SnapCrit(htQuary, Loc);
  -            if (Bid > BestBid) then
  +          for X := Max(1,Locs.Items[I].X-SCAN_RAD) to Min(Locs.Items[I].X+SCAN_RAD,gTerrain.MapX-1) do
  +            if (fPerfArr[Y,X] <> fPerfIdx) then
               begin
  -              BestBid := Bid;
  -              BestLoc := Loc;
  -              Output := True;
  +              fPerfArr[Y,X] := fPerfIdx;
  +              Loc := KMPoint(X,Y);
  +              if gAIFields.Eye.CanAddHousePlan(Loc, htQuary, False, False) then
  +              begin
  +                Bid := + DistCrit(htQuary, Loc) * 40 + SnapCrit(htQuary, Loc);
  +                if (Bid > BestBid) then
  +                begin
  +                  BestBid := Bid;
  +                  BestLoc := Loc;
  +                  Output := True;
  +                end;
  +              end;
               end;
  -          end;
  -        end;
           if Output AND (I >= min(5,Locs.Count-1)) then // Do several points
           begin
             AddPlan(aHT, BestLoc);
  
positive.code: end;
  
  
  // Faster method for placing house (old in at the end of this file)
  //{
  function TKMCityPlanner.FindPlaceForHouse(aUnlockProcedure: Boolean; aHT: TKMHouseType; out aBestLocs: TKMPointArray): Byte;
  
negative.code: 
      fPerfIdx: Byte;
      fPerfArr: TKMByte2Array;
      procedure ClearPerfArr();
  
      procedure AddPlan(aHT: TKMHouseType; aLoc: TKMPoint); overload;
      procedure AddPlan(aHT: TKMHouseType; aLoc: TKMPoint; aSpecPoint: TKMPoint; aChopOnly: Boolean = False); overload;
  