Author: crab
Date: Thu Apr 9 02:25:35 2009
New Revision: 34643
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34643&view=rev
Log:
Changed the 'suitable keep' finding algorithm to re-use 'ai::keeps()' when
checking candidate location
Modified:
trunk/src/ai_move.cpp
Modified: trunk/src/ai_move.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai_move.cpp?rev=34643&r1=34642&r2=34643&view=diff
==============================================================================
--- trunk/src/ai_move.cpp (original)
+++ trunk/src/ai_move.cpp Thu Apr 9 02:25:35 2009
@@ -873,7 +873,7 @@
for(std::map<location,paths::route>::const_iterator rt =
leader_paths.routes.begin(); rt != leader_paths.routes.end(); ++rt) {
const map_location& loc = rt->first;
- if (map_.is_keep(loc)){
+ if (keeps().find(loc)!=keeps().end()){
//@todo: .move_left for 1-turn-moves is really
"cost_to_get_there", it is just not renamed there yet. see r34430 for more
detais.
const int cost_to_loc = rt->second.move_left;
if (units_.count(loc) == 0) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits