Complete.Org: Mailing Lists: Archives: freeciv-ai: January 2003:
[freeciv-ai] Re: Goto coordinates and ai roles

[freeciv-ai] Re: Goto coordinates and ai roles

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Goto coordinates and ai roles
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 20 Jan 2003 13:33:02 +0000 (GMT)

On Sat, 18 Jan 2003, Mike Kaufman wrote:
> > Make the goto_dest a map_position pointer and use null as the guard test.
> > if (punit->goto_dest) {
> >   /* punit->goto_dest->x, punit->goto_dest->y accesses */
> > }

> yes, either of these is far better than (-1,-1) which I'venever ever had a
> good feeling about. Take your pick really, but I prefer the the map_position
> pointer because it's cleaner...

Ok, I'll have a go at this. It has the added advantage of being able to
use a goto struct, where we can keep lots of info like point of origin,
for debugging purposes.

  - Per

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