Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2002:
[freeciv-ai] Activity handling cleanup
Home

[freeciv-ai] Activity handling cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Activity handling cleanup
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 9 Dec 2002 17:28:05 +0000 (GMT)

This is the culmination of a series of cleanups in this area, and finally
makes the AI stop idling fortifying or fortified units. Instead, it idles
units before attacking and moving, not before _considering_ attacking or
moving.

This also fixes all known potentials for infinite loops in
ai_unit_rampage(). I've run a large number of autogames to ensure no more
warnings are forthcoming, so I've replaced the warning message with an
assert. (Apparently ACTIVITY_GOTO isn't good enough for attacking, it
needs to be ACTIVITY_IDLE.)

There is one bug that this patch exposes: The AI sometimes erronously
makes units believe they are being ferried when they are not. Hence, some
units get set in sentry mode instead of fortified mode. It is not within
the scope of this patch to fix this.

It is a relatively simple patch. I intend to commit it in a few days
unless there are any naysayers.

  - Per

Attachment: activityfix3.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] Activity handling cleanup, Per I. Mathisen <=