[Freeciv-Dev] Re: (PR#6189) 1.14: stacked with ai at start
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 19 Sep 2003, Jason Short wrote:
> Gregory Berkolaiko wrote:
> > On Fri, 19 Sep 2003, Jason Short wrote:
> >
> >
> >>[eneg - Thu Sep 18 15:46:51 2003]:
> >>
> >>
> >>>One of my units began a game stacked with an ai's one.
> >>
> >>The attached patch should fix this for 1.14. A similar fix is probably
> >>needed for HEAD.
> >
> >
> > I have 3 problems with the patch.
> >
> > 1. It comes in octet-stream MIME-type, so I have to save it to read it.
>
> Blame RT :-(.
No I blame you, because you know perfectly well it happens and you know
how to avoid it, but couldn't be bothered about it. If you were sending
some boring stupid patches which didn't interest me, I wouldn't complain.
So it's your fault all around.
> > 3. It again doesn't fix the problem, just introduces another check. We
> > need to know what the problem _is_, not what are the symptoms. Maybe it
> > is present in the CVS too, just not for the given seeds.
>
> Sorry; I thought the patch made this obvious. The first unit gets put
> at the starting position, the second and thereafter get put nearby based
> on game.dispersion. For the second and subsequent units there is an
> is_non_allied_unit_tile check, but not for the first. So the second
> unit of nation 1 could be put over the starting position of civilization 2.
>
> So it is a full fix, not just a check. But it has some drawbacks -
> namely that the nation isn't guaranteed to be able to use its starting
> point. If the nations are dense enough it might even be possible that
> there is no usable tile for the later nations.
Yes, I arrived to the same conclusion. This is quite rare though.
> An alternative would first place all the first units of all nations,
> then go back and put down all the others. This method would fix the
> problems from above.
Other alternatives exist, see my email.
> I like the original patch (minus the typo) for 1.14. The attached patch
> makes the suggested change for cvs HEAD. But in working with this code,
> I just couldn't stop until most of the function was restructured. The
> big cleanup is that there are no longer all the overlapping variables
> used independently (i, j, x, y, dx, dy).
Yes, a cleanup is good. Might as well shuffle not the positions
themselves but the player numbers, while you are at it.
G.
- [Freeciv-Dev] Re: (PR#6189) 1.14: stacked with ai at start,
Gregory Berkolaiko <=
|
|