<URL: http://bugs.freeciv.org/Ticket/Display.html?id=37614 >

 Tile was claimed when BASE_FORTRESS was finished. This patch fixes it
to correctly check for "ClaimTerritory" flag (for any base type).


 - ML

diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c	2007-03-05 21:09:47.000000000 +0200
+++ freeciv/server/unittools.c	2007-03-06 02:04:09.000000000 +0200
@@ -713,7 +713,6 @@
     if (total_activity (ptile, ACTIVITY_FORTRESS)
 	>= tile_activity_time(ACTIVITY_FORTRESS, ptile)) {
       tile_add_base(ptile, base_type_get_by_id(BASE_FORTRESS));
-      map_claim_ownership(ptile, unit_owner(punit), ptile);
       unit_activity_done = TRUE;
       new_base = TRUE;
     }
@@ -784,6 +783,11 @@
     /* watchtower becomes effective
      * FIXME: Reqs on other specials will not be updated immediately. */
     unit_list_refresh_vision(ptile->units);
+
+    /* Claim base if it has "ClaimTerritory" flag */
+    if (tile_has_base_flag(ptile, BF_CLAIM_TERRITORY)) {
+      map_claim_ownership(ptile, unit_owner(punit), ptile);
+    }
   }
 
   if (unit_activity_done) {
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to