anchor.diff:        //Recruits should not go to a barracks with ware delivery switched off or with not accept flag for recruits
         if (Houses[I].HouseType = htBarracks)
           and ((Houses[I].DeliveryMode <> dmDelivery) or (TKMHouseBarracks(Houses[I]).NotAcceptRecruitFlag)) then Continue;
  -      if not gTerrain.Route_CanBeMade(Loc, Houses[I].PointBelowEntrance, tpWalk, 0) then Continue;
  -
  -      dist := KMLengthSqr(Loc, Houses[I].Position);
  +      if not gTerrain.Route_CanBeMade(aLoc, Houses[I].PointBelowEntrance, tpWalk, 0) then Continue;
  +
  +      dist := KMLengthSqr(aLoc, Houses[I].Position);
   
         //Always prefer Towers to Barracks by making Barracks Bid much less attractive
         //In case of multiple barracks, prefer the closer one (players should make multiple schools or use WareDelivery to control it)
  
positive.code: 
    case aHouseType of
      htSwine,
      htStables:       Result := TKMHouseSwineStable.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htInn:           Result := TKMHouseInn.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htMarketplace:   Result := TKMHouseMarket.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htSchool:        Result := TKMHouseSchool.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htBarracks:      Result := TKMHouseBarracks.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htTownHall:      Result := TKMHouseTownHall.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htStore:         Result := TKMHouseStore.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htWatchTower:    Result := TKMHouseTower.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htWoodcutters:   Result := TKMHouseWoodcutters.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      htArmorWorkshop: Result := TKMHouseArmorWorkshop.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
      else             Result := TKMHouse.Create(uid, aHouseType,PosX,PosY, aOwner, aHBS);
    end;
  
    if Result <> nil then
  
negative.code: end;
  
  
  function TKMHousesCollection.FindHouse(aType: TKMHouseType; X, Y: Word; const aIndex: Byte = 1; aOnlyCompleted: Boolean = True): TKMHouse;
  var
    HT: THouseTypeSet;
  begin
  