Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2002:
[freeciv-ai] Re: cleanup of AI move and attack handling (PR#1803)

[freeciv-ai] Re: cleanup of AI move and attack handling (PR#1803)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] Re: cleanup of AI move and attack handling (PR#1803)
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 7 Aug 2002 10:29:08 +0000 (GMT)

On Wed, 7 Aug 2002, Raimar Falke wrote:
> There are some style issues with this.

Fixed some I found. Please point to 'em if you find more.

> Barbarians are AI. If all AI moves go through the extra function
> ai_move_unit you can handle the expection quite easy.

Good idea. Done.

New patch attached. Also fixes a stupid bug in aiunit.c:ai_military_gohome
which didn't check if target to attack actually was a target or just a
null position from a failed attempt to ai_military_findvictim. Bug found
by adding some stricter assert checking to the new functions. Also moves a
macro into relevant scope in aiunit.c.


Attachment: aionlymoveclean2.diff
Description: Text document

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