Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] Re: warmap patch and gotohand
Home

[Freeciv-Dev] Re: warmap patch and gotohand

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: warmap patch and gotohand
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Thu, 4 May 2000 16:28:02 +0200

On Thu, 04 May 2000, Nicolas BRUNEL wrote:
> 
> Hello,
> 
>    I looked quickly at Thue gotohand patch. It's a good thing to have
> clearer gotohand functions.c . I didn't check if It reproduces the same
> behaviour as the old one. As has said Thue, it takes time to understand
> gotohand code. I tried also to improve it. Modifications are
>  
>    - the field seacost is withdrawn. It wasn't used anywhere as a seacost
> field. There was always a test before to check if the unit was a land or
> sea unit.

I would think that this was used used for coordination tropp and
transporter use. And if it wasn't I would keep it to use it for that
later.
Looking at the code it seems to me that the AI already uses it for that.
Have you tested your patch and seen if the AI still manages to use
transports?

>    - the local_vector is no more set to zero. It can be wrong. But, It
> looks like it is always set before being used.

Yes, it shouldn't be neccesary to reset it as far as I can see.

>    An old warmap can be reused. If the minimum distance between the two
> units which are using a warmap is d, only add d to the old warmap. 
> Part of the warmap will have the correct cost. (Once you have reached the 
> old position) I don't know if it can be done efficiently. I don't think AI
> manage airlift. 

I can't see how you would update the old warmap. You would in effect have
to iterate through the entire warmap, meaning that you might as well
regenerate it.

>    In ai/aiunit.c : int find_something_to_kill
>    A test is added so that AI only try to conquer ennemy cities.

I didn't notice that it tried conquring friendly cities before.

> Nicolas

-Thue



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