Author: cazfi
Date: Tue Sep  8 20:09:09 2015
New Revision: 29820

URL: http://svn.gna.org/viewcvs/freeciv?rev=29820&view=rev
Log:
Replaced road_type_iterate() with extra_type_by_cause_iterate(EC_ROAD) in 
threaded AI.

See patch #6328

Modified:
    trunk/ai/threaded/taicity.c

Modified: trunk/ai/threaded/taicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/threaded/taicity.c?rev=29820&r1=29819&r2=29820&view=diff
==============================================================================
--- trunk/ai/threaded/taicity.c (original)
+++ trunk/ai/threaded/taicity.c Tue Sep  8 20:09:09 2015
@@ -234,14 +234,16 @@
          * removal activity it's the value after the removal. */
         old_move_cost = tile_terrain(ptile)->movement_cost * SINGLE_MOVE;
 
-        road_type_iterate(pold) {
-          if (tile_has_road(ptile, pold) && pold != proad) {
+        extra_type_by_cause_iterate(EC_ROAD, poe) {
+          struct road_type *pold = extra_road_get(poe);
+
+          if (tile_has_extra(ptile, poe) && poe != tgt) {
             if (road_provides_move_bonus(pold)
                 && pold->move_cost < old_move_cost) {
               old_move_cost = pold->move_cost;
             }
           }
-        } road_type_iterate_end;
+        } extra_type_by_cause_iterate_end;
 
         if (proad->move_cost < old_move_cost) {
           if (proad->move_cost >= terrain_control.move_fragments) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to