Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] Re: Goto for airplanes
Home

[Freeciv-Dev] Re: Goto for airplanes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Goto for airplanes
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Mon, 24 Apr 2000 21:12:14 -0400

At 2000/04/20 19:02 , Thue Janus Kristensen wrote:
>This patch makes airplanes on goto automatically use cities and airbases
>as waypoints.

Your patch looks mostly good.  I've attached an updated patch with a few
changes:

- Fixed several spelling errors in comments and freelog() calls.

- Renamed naive_can_move_between() to naive_air_can_move_between(), because
it really only works for air units, right?

- In do_unit_goto(), your patch changed the call to unit_list_find()
(called after handle_unit_move_request() returns) to use punit->id, rather
than the cached value thereof.  Unfortunately, handle_unit_move_request()
can result in the punit unit being killed and wiped, and hence the pointer
punit being no longer valid. (In fact, the call to unit_list_find() is for
the purpose of determining that the punit unit has been killed.)  I changed
it back to use a cached id value.

Attachment: airplane_goto-Apr-24.diff.gz
Description: Binary data

jjm

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