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:     destructor Destroy; override;
  
      procedure Clear;
      function AddHouse(aHouseType: TKMHouseType; PosX,PosY: Integer; aOwner: TKMHandID; RelativeEntrance: Boolean):TKMHouse;
      function AddHouseWIP(aHouseType: TKMHouseType; PosX,PosY: Integer; aOwner: TKMHandID): TKMHouse;
      procedure AddHouseToList(aHouse: TKMHouse);
      property Count: Integer read GetCount;
      procedure OwnerUpdate(aOwner: TKMHandID);
      property Houses[aIndex: Integer]: TKMHouse read GetHouse; default;
      function HitTest(X, Y: Integer): TKMHouse;
      function GetHouseByUID(aUID: Integer): TKMHouse;
      procedure GetHousesInRect(const aRect: TKMRect; List: TList<TKMHouse>);
      function FindEmptyHouse(aUnitType: TKMUnitType; const Loc: TKMPoint): TKMHouse;
      function FindHouse(aType: TKMHouseType; X,Y: Word; const aIndex: Byte = 1; aOnlyCompleted: Boolean = True): TKMHouse; overload;
      function FindHouse(const aTypes: THouseTypeSet; X,Y: Word; const aIndex: Byte = 1; aOnlyCompleted: Boolean = True): TKMHouse; overload;
      function FindHousesInRadius(aLoc: TKMPoint; aSqrRadius: Single; aTypes: THouseTypeSet; aOnlyCompleted: Boolean = True): TKMHouseArray;
      function GetTotalPointers: Cardinal;
      procedure Save(SaveStream: TKMemoryStream);
  
negative.code:   TKMHousesCollection = class
    private
      fHouses: TKMList; //Private to hide methods we don't want to expose
      function AddToCollection(aHouseType: TKMHouseType; aPosX, aPosY: Integer; aOwner: TKMHandID; aHBS: TKMHouseBuildState):TKMHouse;
      function GetHouse(aIndex: Integer): TKMHouse; inline;
      function GetCount: Integer;
    public
  