Allow recruiting in large castles.
It's now possible to recruit in castles more than 99 tiles away (bug #12185). Backport of 2008-08-20T18:57:50Z!esr@thyrsus.com upon Rhonda's request.
This commit is contained in:
parent
4e414157d0
commit
86ca71e379
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Version 1.4.7+svn:
|
||||
* miscellaneous and bug fixes:
|
||||
* Allow recruiting in a castle more than 99 tiles away from the keep
|
||||
(bug #12185)
|
||||
|
||||
Version 1.4.7:
|
||||
* campaigns:
|
||||
* Descent into Darkness
|
||||
|
|
|
@ -112,7 +112,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…
Add table
Reference in a new issue