Author: esr Date: Wed Aug 20 20:57:50 2008 New Revision: 28805 URL: http://svn.gna.org/viewcvs/wesnoth?rev=28805&view=rev Log: Address bug #12185: Cannot recruit more than 99 castle tiles away.
Modified: trunk/src/actions.cpp Modified: trunk/src/actions.cpp URL: http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=28805&r1=28804&r2=28805&view=diff ============================================================================== --- trunk/src/actions.cpp (original) +++ trunk/src/actions.cpp Wed Aug 20 20:57:50 2008 @@ -114,7 +114,10 @@ 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; _______________________________________________ Wesnoth-commits mailing list Wesnoth-commits@gna.org https://mail.gna.org/listinfo/wesnoth-commits