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

[Freeciv-Dev] (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: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6903) a "fix" for maps with no poles
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 18:58:06 -0800
Reply-to: rt@xxxxxxxxxxx

<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] (PR#6903) a "fix" for maps with no poles, Jason Short <=