Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Re: Air unit goto improved
Home

[Freeciv-Dev] Re: Air unit goto improved

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kero@xxxxxx, Kero van Gelder <kero@xxxxxxxxxxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Air unit goto improved
From: Thue <thue@xxxxxxx>
Date: Tue, 18 Jul 2000 00:19:50 +0200

Den man, 17 jul 2000 skrev Kero van Gelder:
> 
> Hi!
> 
> Air unit GoTo now:
> 1) takes moves_left into account,
> 2) will switch to ACTIVITY_GOTO even if first refuel position is
>    current position,
> 3) works for units with fuel > 2 as well.

Well, it did before too.

> For this, I rewrote find_air_first_destination() mostly (point 1&3),
> changed find_the_shortest_path() to return TRUE when the destination
> is the current position (point 2) and changed
> naive_air_can_move_between() into air_can_move_between(), which
> returns the #moves left instead of a boolean value; it wasn't a naive
> function either (point 1).

I think the "naive" part of the name was historical; my first
implementation was kind of dumb :)

> There is still plenty of room for improvement, mainly:
>  - when air units run out of fuel after the goto,
>  - using fog of war (might want to implement GoTo in the client,
>    not the server).
> 
> As a side-note: when an air-unit is on GoTo according to (point 2),
> it is impossible to see how much moves it has left. As a solution,
> I'd like to see more information printed when units are selected,
> listed or shown otherwise. I made a first step towards this goal a
> while ago and sent the patch to freeciv-dev:
> 
>   Date: Wed, 28 Jun 2000 22:28:34 +0200
>   From: Kero van Gelder <kero@xxxxxxxxxxxxxxxxxxxxxx>
>   To: freeciv-dev@xxxxxxxxxxx
>   Subject: [Freeciv-Dev] Two patches
> 
> I am refering to the second patch of them (though neither was applied).
> 
> Bye,
> Kero.
> 
> PS: patch gives a couple of offsets, but works on the current CVS.

I made some cosmetic changes, but other than that it should be good as it
is. I need to test it some more however, if nothing else then to validate
my own changes.

-Thue

Attachment: air_goto.diff.gz
Description: GNU Zip compressed data


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