[Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
As was requested about a month ago, I am splitting my warmap patch into a
series of smaller patches.
The first part is mostly cleanup.
Below is the list of features (unfortunately there is no way to comment
the patch in the patch itself):
File gotohand.c:
In really_generate_warmap:
* removed some comments referring to the code which is not there for
years
* added some comments (editor, feel free to cut my comments short)
* removed "silence compiler warning" line because there is no compiler
warning anymore
In generate_warmap:
* comments
* fixed buggy check
if (warmap.warunit == punit && !warmap.cost[punit->x][punit->y])
* removed initializations that do not affect anything
In dir_ok:
* removed dir_ok (sorry guys)
In goto_zoc_ok:
* as was proposed in the comment, changed the code to take into account
where we _really_ came from, not to guess the direction from dir_ok
* changed the comment accordingly
In find_a_direction:
* the previous handling of trireme was pathetic. changed it to use
is_coast_seen. NB: it does not mean that triremes are safe: if
find_a_direction is given an unsafe destination it is unlikely to help.
=====================
General remark:
AI goto has 3 levels
1. Find a destination -- generate_warmap
takes into account terrain only
2. Find routes to destination -- find_the_shortest_path
takes into account some info about enemy and ZOC
3. Choose between the routes -- find_a_direction
final level of detalisation.
=====================
In other places:
* general cleanup of magic numbers
* definition of is_coast_seen
Waiting for your comments,
G.
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and
Music Charts
http://uk.my.yahoo.com
warmap7_part1v1.diff
Description: warmap7_part1v1.diff
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/02
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/03
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007),
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/15
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/16
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/16
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/17
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/18
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/18
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Ross W. Wetmore, 2001/11/19
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/19
|
|