[Freeciv-Dev] Re: (PR#3928) Convert client to use PF
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 8 Apr 2003, Raimar Falke wrote:
> On Mon, Apr 07, 2003 at 08:43:28AM -0700, Gregory Berkolaiko wrote:
> > /**********************************************************************
> > -...
> > + PF callback to get the path with the minimal number of steps (out of
> > + all shortest paths).
> > ***********************************************************************/
> > +/* Glip: can we have a better name please? */
> > +static int my_get_EC(int x, int y, enum known_type known,
> > + struct pf_parameter *param)
>
> You can create one. I always use "my_". If I would have anonymous
> function I make give them no name at all.
Well, even client_goto_EC_callback is nicer than "mine".
But I would do EC_always_one...
> > +/* Glip: dir is enum, in many other places too. */
>
> The use of direction in the other cases is more or less buggy. You
> loose for example if dir>=4 && reverse(dir)>=4. There is now code to
> test for this. So some kind of "enum direction8_folded_to_0-3" is
> needed. With the corresponding functions for the conversion.
Well, maybe not then ;)
> > I didn't change any of your code, only comments, but I added one fix to
> > prevent client crashing (also marked by "Glip:") and threw in a couple of
> > fixes of the path_finding, for good measure. These were the bugs I
> > discovered while doing rampage, we can commit them separately or as part
> > of your patch. The bugs are:
> > -- construct_path tried to step back beyond the initial position of the
> > path
> > -- zoc-handling prevented paths ending on a military target.
>
> It was to be expected that we find errors in PF. These should be
> commited separately.
Can you check and commit them please?
Nobody but you can check it anyway.
> > On Sat, 5 Apr 2003, Raimar Falke wrote:
> >
> > > > > Open issues are:
> > > > > - the network interface doesn't support dangerous tiles
> > > > > - the path execution at the server doesn't support dangerous tiles
> > > > > - the network interface is quite weird (for example it divides the
> > > > > path into 20-positions chunks while a chunk could holds 1500/2=750
> > > > > positions)
> >
> > So this means that if I attempt doing goto with a trireme I will get a
> > core? I think it should be fixed before this is committed.
>
> Untested: the server will just go the steps and will not wait at the
> steps at which the unit should wait. So you don't get a core but a
> sunken trireme.
Not as bad as the core. Any reason why you want to leave it for later?
> > But have you fasted?
>
> Can I do more sport in exchange? This is also a burden.
Okay.
G.
[Freeciv-Dev] Re: (PR#3928) Convert client to use PF,
Gregory Berkolaiko <=
[Freeciv-Dev] Re: (PR#3928) Convert client to use PF, Gregory Berkolaiko, 2003/04/09
Message not available
[Freeciv-Dev] Re: (PR#3928) Convert client to use PF, Gregory Berkolaiko, 2003/04/10
[Freeciv-Dev] Re: (PR#3928) Convert client to use PF, Gregory Berkolaiko, 2003/04/24
[Freeciv-Dev] Re: (PR#3928) Convert client to use PF, Gregory Berkolaiko, 2003/04/27
|
|