Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6903) a "fix" for maps with no poles
Home

[Freeciv-Dev] Re: (PR#6903) a "fix" for maps with no poles

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6903) a "fix" for maps with no poles
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Thu, 27 Nov 2003 06:34:51 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6903 >

The check for separatepoles that the patch removes should cover the
scenario you mistakenly think is a problem.

This insures that CIV compatibility elements for this option are
correctly handled. Your fix breaks this rather badly.

What is missing is complete check that includes wrapping, i.e. there
is only one pole if you wrap N-S, and thus the hard coding of "2" is
a minor issue for the topology patch.

The other options are not even worth considering.

Please drop this patch and try again with one that reflects a proper
understanding of the special separatepoles parameter.

Cheers,
RossW
=====

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=6903 >
> 
> Some code in map.h assumes that the poles are continents 1 and 2.  This 
> prevents starting positions from being placed on the first two 
> continents - a problem when those continents are not poles.  Under gen5 
> this often leaves the world without enough valid starting positions.
> 
> The attached fix simply removes the continent check.  This is fine with 
> any conceivable ruleset since there is a terrain restriction on starting 
> positions, and no polar terrain should ever pass it.
> 
> Another possible fix would formally define continents 1 and 2 as the 
> poles, and start the numbering from 3 even when there are no poles. 
> This is more work and less elegant IMO.
> 
> jason
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: common/map.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/common/map.c,v
> retrieving revision 1.151
> diff -u -r1.151 map.c
> --- common/map.c      2003/11/17 18:22:04     1.151
> +++ common/map.c      2003/11/19 02:47:39
> @@ -530,12 +530,7 @@
>    if (map_has_special(x, y, S_HUT))
>      return TRUE;
>    
> -  /* don't want them starting on the poles unless the poles are
> -     connected to more land: */
> -  if (map_get_continent(x, y) <= 2 && map.generator != 0
> -      && map.separatepoles) {
> -    return TRUE;
> -  }
> +  /* Nobody will start on the poles since they aren't valid terrain. */
>  
>    /* don't start too close to someone else: */
>    for (i=0;i<nr;i++) {




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#6903) a "fix" for maps with no poles, rwetmore@xxxxxxxxxxxx <=