diff --git a/src/actions.cpp b/src/actions.cpp index 471e0070955..b0df585348d 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -114,7 +114,10 @@ bool can_recruit_on(const gamemap& map, const gamemap::location& leader, const g return false; castle_cost_calculator calc(map); - const paths::route& rt = a_star_search(leader, loc, 100.0, &calc, map.w(), map.h()); + // The limit computed in the third argument is more than enough for + // any convex castle on the map. Strictly speaking it could be + // reduced to sqrt(map.w()**2 + map.h()**2). + const paths::route& rt = a_star_search(leader, loc, map.w()+map.h(), &calc, map.w(), map.h()); if(rt.steps.empty()) return false;