[Freeciv-Dev] Air unit goto improved
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
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).
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.
+--- Kero --------------------------------- kero@xxxxxx ---+
| Don't split your mentality without thinking twice |
| Proud like a God -- Guano Apes |
+--- M38c ------------------ http://huizen.dds.nl/~kero ---+
air_goto.diff.gz
Description: application/gunzip
- [Freeciv-Dev] Air unit goto improved,
Kero van Gelder <=
|
|