From: Csaba Halasz Date: Tue, 13 Oct 2009 15:54:27 +0000 (+0200) Subject: Use wider search in FGCommList::FindByPos X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce7c98f210fc8ed6a5d7ec37dcce14ce64bc84a3;p=flightgear.git Use wider search in FGCommList::FindByPos --- diff --git a/src/ATCDCL/commlist.cxx b/src/ATCDCL/commlist.cxx index baed76f37..96baa9ad7 100644 --- a/src/ATCDCL/commlist.cxx +++ b/src/ATCDCL/commlist.cxx @@ -167,8 +167,8 @@ int FGCommList::FindByPos(const SGGeod& aPos, double range, comm_list_type* stat SGBucket buck(aPos); // get neigboring buckets - int bx = (int)( range*SG_NM_TO_METER / buck.get_width_m() / 2); - int by = (int)( range*SG_NM_TO_METER / buck.get_height_m() / 2 ); + int bx = (int)( range*SG_NM_TO_METER / buck.get_width_m() / 2) + 1; + int by = (int)( range*SG_NM_TO_METER / buck.get_height_m() / 2 ) + 1; // loop over bucket range for ( int i=-bx; i<=bx; i++) {