[Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, Dec 02, 2001 at 05:30:05PM +0000, Gregory Berkolaiko wrote:
> > > On Sat, Dec 01, 2001 at 07:36:00PM +0000, Gregory Berkolaiko wrote:
> > > >
> > > > more to follow.
> >
> > another patch in the wall.
> >
> > It fixes one non-obvious bug in generate_warmap and removes redundant
> > initialisations. It might even make things faster.
>
> Can you explain why we have these two fields cost and seacost? And why
> we can't merge them?
Function like assess_danger(city) will search through _all_ enemy units
and calculate whether they endanger the city. For this it needs an array
with distances to the city by both land and sea. This is why both costs
are needed sometimes.
You cannot record them in one array since the distance from A to B can be
different depending on whether you swim or walk.
You can solve this problem, for example, make land-warmap, search through
all land units first, than make sea-warmap and search through all naval
units and through all land units who might use sea transport. But it is
not any cleverer than the current situation.
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
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/01
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/01
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/01
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/02
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068),
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/03
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/03
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/03
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/03
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Raimar Falke, 2001/12/04
- [Freeciv-Dev] Re: Cleaning up gotohand.c (PR#1068), Gregory Berkolaiko, 2001/12/04
|
|