[Freeciv-Dev] Re: Reproducable core dump (PR#1051)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Nov 27, 2001 at 11:16:06AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> Gregory Berkolaiko wrote
>
> > --- jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> >>Gregory Berkolaiko wrot
>
>
> >>>2. This piece of code is used by human palyers (AI doesn't fly) but
> >>>it peeks under the FOW absolutely shamelessly. You don't attempt to
> >>>fix it.
> >>>Why not?
> >>>
> >>
> >>Ouch. I did not realize this was a problem - I just blindly duplicated
> >>the original functionality :-(. The goto should also avoid going
> >>across unknown tiles, right?
> >>
> >
> > It is a problem, largerly unfixed. I have a patch fixing it in
> > find_the_best_path, but it's in the waiting.
> >
> > As for unknown tiles, there is a comment at
> > http://www.freeciv.org/lxr/source/server/gotohand.c?v=cvs#L763
> > with which I agree. There is also a maximalist's and minimalist's
> > approach to the problem of avoiding enemy. You seem to follow
> > maximalist: if you don't know the tile, you assume it's enemy-occupied.
> > I think it is more wise to do the minimalist's "if I don't see the enemy,
> > I hope it's not there" approach with the planes, otherwise you don't get
> > anywhere (in particular to some airfield -- it doesn't give you vision).
> > So what I had in mind is more like:
> > if (!MAPSTEP(nx, ny, x, y, dir) ||
> > (map_get_known_and_seen(nx, ny, pplayer)
> > && is_non_allied_unit_tile(map_get_tile(nx, ny), pplayer)
> > && !((nx==dest_x) && (ny==dest_y)))) {
> > break;
> > }
> > Note that we don't care if our destination is occupied !
>
>
> Hmm, I'll have to double-check the destination occupied situation.
>
> My current implementation isn't completely minimalist: it will refuse to
> fly through unknown tiles but will happily fly through known, fogged
> tiles assuming no enemy is there. Is this wise? Really, a fogged tile
> is just as likely to contain an enemy as an unknown tile.
A nice goal may be to have this behavior changeable by function
arguments.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"We just typed make..."
-- Stephen Lambrigh, Director of Server Product Marketing at Informix,
about porting their Database to Linux
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/02
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/11
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), Gregory Berkolaiko, 2001/11/26
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/26
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/27
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/27
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/28
- [Freeciv-Dev] Re: Reproducable core dump (PR#1051), jdorje, 2001/11/28
|
|