Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9502) nowhere for river to run
Home

[Freeciv-Dev] (PR#9502) nowhere for river to run

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: use_less@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#9502) nowhere for river to run
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Jul 2004 00:22:50 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [use_less - Mon Jul 26 06:06:15 2004]:
> 
> > set seed 2837624
> > set randseed 23456124
> > create idiot
> > start
> Assertion failed: best_val != -1, file mapgen.c, line 850

On closer inspection the bug is rather more dramatic and hideous.  I
will commit the fix immediately.

jason

Index: common/map.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.h,v
retrieving revision 1.200
diff -u -r1.200 map.h
--- common/map.h        26 Jul 2004 03:38:29 -0000      1.200
+++ common/map.h        26 Jul 2004 07:19:50 -0000
@@ -592,10 +592,12 @@
     return TRUE;
   case DIR8_SOUTHEAST:
   case DIR8_NORTHWEST:
-    return !(topo_has_flag(TF_HEX) && !topo_has_flag(TF_ISO));
+    /* These directions are cardinal in hexagonal topologies. */
+    return topo_has_flag(TF_HEX) && !topo_has_flag(TF_ISO);
   case DIR8_NORTHEAST:
   case DIR8_SOUTHWEST:
-    return !(topo_has_flag(TF_HEX) && topo_has_flag(TF_ISO));
+    /* These directions are cardinal in iso-hex topologies. */
+    return topo_has_flag(TF_HEX) && topo_has_flag(TF_ISO);
   }
   return FALSE;
 }

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