mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 00:31:39 +00:00
Address bug #12185: Cannot recruit more than 99 castle tiles away.
This commit is contained in:
parent
1dbe578582
commit
f52b29f4c0
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user