anchor.diff:  
   
   type
  -
  -  //Collection of influence maps
  +  // Collection of influence maps
     TKMInfluences = class
     private
       fMapX, fMapY, fPolyCnt: Word; // Limits of arrays
  
positive.code: 
  function TKMInfluences.CanPlaceHouseByInfluence(const aPL: TKMHandID; const aIdx: Word; const aIgnoreAllies: Boolean = False): Boolean;
  var
    BestOwner: TKMHandID;
  begin
    BestOwner := GetBestOwner(aIdx);
    Result := (BestOwner >= 0) AND (OwnPoly[aPL, aIdx] > 0) AND ((BestOwner = aPL) OR (not aIgnoreAllies AND (gHands[aPL].Alliances[BestOwner] = atAlly)));
  end;
  
  
  
negative.code:   INIT_HOUSE_INFLUENCE = 255;
    MAX_INFLUENCE_DISTANCE = 150;
  var
    isAI: Boolean;
    I, cnt: Integer;
    H: TKMHouse;
    idxArray: TKMWordArray;
  begin
    //Clear array (it is better to clear ~3000 polygons instead of 255*255 tiles)
    FillChar(fOwnership[aPL*fPolyCnt], SizeOf(fOwnership[0]) * fPolyCnt, #0);
  
    // Create array of polygon indexes
    SetLength(idxArray, gHands[aPL].Houses.Count);
    cnt := 0;
    isAI := gHands[aPL].IsComputer;
    for I := 0 to gHands[aPL].Houses.Count - 1 do
    begin
      H := gHands[aPL].Houses[I];
      if not H.IsDestroyed
      and not (H.HouseType in [htWatchTower, htWoodcutters])
      and (isAI or H.IsComplete) then // Player must finish the house to update influence so he cannot troll the AI
      begin
        // Use point below entrance to match NavMeshDefence algorithm and city center detection in Eye
        idxArray[cnt] := fNavMesh.KMPoint2Polygon[H.PointBelowEntrance];
        Inc(cnt);
      end;
    end;
  
    if cnt > 0 then
      fInfluenceFloodFill.HouseInfluence(aPL, INIT_HOUSE_INFLUENCE, MAX_INFLUENCE_DISTANCE, cnt - 1, idxArray);
  end;
  
  
  