[Freeciv-Dev] Re: bug in mapgen (PR#1043)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Nov 26, 2001 at 06:00:12AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> Ross W. Wetmore wrote:
>
> > I would delete the lines. I don't think they are actually used after
> > this point, but I didn't do an exhaustive check. Create_island() resets
> > them each time, and when you leave at this point you aren't looping
> > back to place_island().
>
>
> I do not think the lines can be deleted. The crash happens because of
> the oddball random number generation in fill_island and
> fill_island_rivers; these appear to use n/s/e/w as set up by
> create_island and place_island. All of this takes place within make_island.
>
> IMO the random map position should be done safely. The attached patch
> does this in a simple (though not perfect) way.
>
>
> > Since they are (badly named) globals anybody could access them, but it
> > isn't really likely.
>
>
> I strongly agree that the globals should be removed, and the data be
> passed around in a struct as Raimar's patch accomplishes. Really,
> though, that might as well be a different patch. Raimar: I think you
> should apply it. If you want I'll clean it up (by removing the
> bug-related code).
The global handling has been applied as a seperate patch. I propose
this fix for the bug.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"- Amiga Y2K fixes (a bit late, wouldn't you say?)"
-- Linus Torvalds about linux 2.4.0 at 4 Jan 2001
mapgen3.diff
Description: Text document
|
|