Complete.Org: Mailing Lists: Archives: freeciv-ai: July 2002:
[freeciv-ai] big unit move cleanup

[freeciv-ai] big unit move cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] big unit move cleanup
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 20 Jul 2002 16:09:16 +0000 (GMT)

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

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.


[Prev in Thread] Current Thread [Next in Thread]