Author: sveinung
Date: Thu Mar 24 15:15:51 2016
New Revision: 32268

URL: http://svn.gna.org/viewcvs/freeciv?rev=32268&view=rev
Log:
Fair Islands: one resource extra per tile.

My fix for bug #24533 caused the Fair Islands map generator to set the extra
at once a resource is placed at a tile. It can later be overwritten by
another resource. The result is that the final resource is valid while those
that were overwritten by it remain as invalid resources.

Remove this accidental change.

See bug #24537

Modified:
    trunk/server/generator/mapgen.c

Modified: trunk/server/generator/mapgen.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/generator/mapgen.c?rev=32268&r1=32267&r2=32268&view=diff
==============================================================================
--- trunk/server/generator/mapgen.c     (original)
+++ trunk/server/generator/mapgen.c     Thu Mar 24 15:15:51 2016
@@ -2958,7 +2958,6 @@
     for (r = pftile->pterrain->resources; *r != NULL; r++) {
       if (fc_rand(++j) == 0) {
         pftile->presource = *r;
-        BV_SET(pftile->extras, extra_index((*r)->self));
       }
     }
     /* Note that 'pftile->presource' might be NULL if there is no suitable
@@ -2971,6 +2970,8 @@
           pftile2->flags |= FTF_NO_RESOURCE;
         }
       }
+
+      BV_SET(pftile->extras, extra_index(pftile->presource->self));
     }
   }
 }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to