| [freeciv-ai] big unit move cleanup[Top] [All Lists][Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
 This is the previous patch's big brother. It moves all the ai code out of
unithand.c's handle_unit_move_request function and into gotohand.c's
do_unit_goto and three new functions in aitools.c. This is also mostly a
design level patch - it has not been extensively tested. It just seems to
work alright from watching a few AIs slug it out. I have tried as best as
I could to retain previous behaviour, but somehow autogames turn totally
different anyway. A few eyes to help find the reasons for this would be
appreciated.
Also I nixed one serious bug in the small cleanup patch.
Next on the line is do_unit_goto. Someone please explain to me why
  if (punit->pgr) {
    /* we have a precalculated goto route */
    return goto_route_execute(punit);
  }
the above is never executed.
Yours
Per
 
[freeciv-ai] big unit move cleanup,
Per I. Mathisen <=
 
 |  |