# HG changeset patch # User frosch # Date 1214415053 0 # Node ID 63e761696bf8f56a3730e1d95fd6c9119fc8f007 # Parent 06914318bfa57ebe0d5c2e375d262518c1ae4b87 (svn r13629) -Fix [FS#2108](r13603): diameter != radius diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -274,10 +274,10 @@ uint8 searchtype = GB(parameter, 6, 2); uint8 searchradius = GB(parameter, 0, 6); if (searchtype >= lengthof(search_procs)) return 0; // do not run on ill-defined code - if (searchradius < 2) return 0; // do not use a too low radius + if (searchradius < 1) return 0; // do not use a too low radius /* Use a pointer for the tile to start the search. Will be required for calculating the distance*/ - if (CircularTileSearch(&found_tile, searchradius, search_procs[searchtype], data)) { + if (CircularTileSearch(&found_tile, 2 * searchradius + 1, search_procs[searchtype], data)) { return DistanceManhattan(found_tile, tile); } return 0;