[Freeciv-Dev] (PR#5431) Unecessary Global Variable in mapgen.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[cameron - Thu Aug 28 17:08:58 2003]:
> [glip - Thu Aug 28 13:08:55 2003]:
>
> > The code is produced by good intentions, if you look down to see how
> > totalweight is used. But I agree it should be removed. The same,
> > however, should be done to the similar code in mapgenerator4, in the
> > same patch!
>
> This patch doesn't use static variables, and fixes the incredibly ugly
> code in gen4. This single line will do exactly the same thing as what
> was there before, and is vastly more transparent to what it's doing.
>
> I am fairly certain my arithmetic is correct.
I am fairly cerain it isn't.
totalweight = (30 + bigweight) * game.nplayers;
totalweight += (game.nplayers == 1 ? 2 * bigweight : 0);
would be more correct I think. It's quite ridiculous but so it is
written. Also, the first call to make_island needs a correction to the
weight I think.
I also notice that you did not change the spacing in
+ } else if(checkmass>map.xsize+map.ysize) {
If you don't want to do it, please say why.
Not being careful about answering all the comments does not speed up the
inclusion of a patch. It just annoys reviewers ;)
G.
|
|