Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: bug in mapgen (PR#1043)
Home

[Freeciv-Dev] Re: bug in mapgen (PR#1043)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: bug in mapgen (PR#1043)
From: Christian Knoke <ChrisK@xxxxxxxx>
Date: Mon, 26 Nov 2001 21:56:34 +0100

I assume that Jason's patch from Nov 26 is the valid one (cited below).
While it fixes most of the problems (and should probably go it, the
bug is really annoying), it fixes not all. With

------------------
set xsize 50
set ysiz 35
set gene 2
set diplch 50
set aifill 4
------------------

I get sometimes:

--------------------------------------------
(gdb) bt
#0  0x400b0861 in kill () from /lib/libc.so.6
#1  0x400b0665 in raise () from /lib/libc.so.6
#2  0x400b1c81 in abort () from /lib/libc.so.6
#3  0x400aaa52 in Letext () from /lib/libc.so.6
#4  0x08076248 in show_area (pplayer=0x813a288, x=-1, y=6, len=1) at
maphand.c:746
#5  0x0806b5ec in init_new_game () at gamehand.c:136
#6  0x08050b63 in srv_main () at srv_main.c:1964
#7  0x0804a027 in main (argc=3, argv=0xbffff614) at civserver.c:147
#8  0x4009f7ee in __libc_start_main () from /lib/libc.so.6
---------------------------------------------

Christian

> ? freeciv.kdevses
> ? old
> ? topology
> Index: server/mapgen.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/server/mapgen.c,v
> retrieving revision 1.77
> diff -u -r1.77 mapgen.c
> --- server/mapgen.c   2001/11/11 17:46:21     1.77
> +++ server/mapgen.c   2001/11/26 13:56:10
> @@ -1457,8 +1457,10 @@
>      i= 0;
>  
>    while (i && failsafe--) {
> +    do {
>      y = myrand(s - n) + n;
>      x = myrand(e - w) + w;
> +    } while (!normalize_map_pos(&x, &y));
>      if (map_get_continent(x,y) == isleindex &&
>               map_get_terrain(x,y) == T_GRASSLAND) {
>  
> @@ -1510,8 +1512,10 @@
>    if(failsafe<0){ failsafe= -failsafe; }
>  
>    while (i && failsafe--) {
> +    do {
>      y = myrand(s - n) + n;
>      x = myrand(e - w) + w;
> +    } while (!normalize_map_pos(&x, &y));
>      if (map_get_continent(x,y) == isleindex &&
>               map_get_terrain(x,y) == T_GRASSLAND) {
>  

-- 
* Christian Knoke                           +49 4852 92248 *
* D-25541 Brunsbuettel                  Wurtleutetweute 49 *
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.



[Prev in Thread] Current Thread [Next in Thread]