Author: cazfi
Date: Thu Aug  4 10:06:56 2016
New Revision: 33453

URL: http://svn.gna.org/viewcvs/freeciv?rev=33453&view=rev
Log:
Replaced server calls of tile_remove_extra() with tile_destroy_extra(), 
destroy_extra(), or
tile_extra_rm_apply() as needed.

See bug #24201

Modified:
    branches/S2_6/server/barbarian.c
    branches/S2_6/server/citytools.c
    branches/S2_6/server/gamehand.c
    branches/S2_6/server/generator/mapgen.c
    branches/S2_6/server/unittools.c

Modified: branches/S2_6/server/barbarian.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/barbarian.c?rev=33453&r1=33452&r2=33453&view=diff
==============================================================================
--- branches/S2_6/server/barbarian.c    (original)
+++ branches/S2_6/server/barbarian.c    Thu Aug  4 10:06:56 2016
@@ -538,7 +538,7 @@
   /* Remove huts in place of uprising */
   extra_type_by_cause_iterate(EC_HUT, pextra) {
     if (tile_has_extra(utile, pextra)) {
-      tile_remove_extra(utile, pextra);
+      tile_extra_rm_apply(utile, pextra);
       hut_present = TRUE;
     }
   } extra_type_by_cause_iterate_end;

Modified: branches/S2_6/server/citytools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/citytools.c?rev=33453&r1=33452&r2=33453&view=diff
==============================================================================
--- branches/S2_6/server/citytools.c    (original)
+++ branches/S2_6/server/citytools.c    Thu Aug  4 10:06:56 2016
@@ -1779,7 +1779,7 @@
   extra_type_iterate(pextra) {
     if (tile_has_extra(pcenter, pextra)
         && !is_native_tile_to_extra(pextra, pcenter)) {
-      tile_remove_extra(pcenter, pextra);
+      tile_extra_rm_apply(pcenter, pextra);
     }
   } extra_type_iterate_end;
 

Modified: branches/S2_6/server/gamehand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/gamehand.c?rev=33453&r1=33452&r2=33453&view=diff
==============================================================================
--- branches/S2_6/server/gamehand.c     (original)
+++ branches/S2_6/server/gamehand.c     Thu Aug  4 10:06:56 2016
@@ -172,7 +172,7 @@
    * tile (with the hut) earlier: */
   extra_type_by_cause_iterate(EC_HUT, pextra) {
     if (tile_has_extra(ptile, pextra)) {
-      tile_remove_extra(ptile, pextra);
+      tile_extra_rm_apply(ptile, pextra);
       hut_present = TRUE;
     }
   } extra_type_by_cause_iterate_end;

Modified: branches/S2_6/server/generator/mapgen.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/generator/mapgen.c?rev=33453&r1=33452&r2=33453&view=diff
==============================================================================
--- branches/S2_6/server/generator/mapgen.c     (original)
+++ branches/S2_6/server/generator/mapgen.c     Thu Aug  4 10:06:56 2016
@@ -1174,7 +1174,7 @@
       extra_type_by_cause_iterate(EC_ROAD, priver) {
         if (tile_has_extra(ptile, priver)
             && road_has_flag(extra_road_get(priver), RF_RIVER)) {
-          tile_remove_extra(ptile, priver);
+          tile_extra_rm_apply(ptile, priver);
         }
       } extra_type_by_cause_iterate_end;
       tile_set_continent(ptile, 0);

Modified: branches/S2_6/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unittools.c?rev=33453&r1=33452&r2=33453&view=diff
==============================================================================
--- branches/S2_6/server/unittools.c    (original)
+++ branches/S2_6/server/unittools.c    Thu Aug  4 10:06:56 2016
@@ -840,7 +840,7 @@
                                                   NULL, punit);
     }
     if (total_activity_done(ptile, ACTIVITY_POLLUTION, 
punit->activity_target)) {
-      tile_remove_extra(ptile, punit->activity_target);
+      destroy_extra(ptile, punit->activity_target);
       unit_activity_done = TRUE;
     }
     break;
@@ -853,7 +853,7 @@
                                                   NULL, punit);
     }
     if (total_activity_done(ptile, ACTIVITY_FALLOUT, punit->activity_target)) {
-      tile_remove_extra(ptile, punit->activity_target);
+      destroy_extra(ptile, punit->activity_target);
       unit_activity_done = TRUE;
     }
     break;
@@ -2840,7 +2840,7 @@
     if (tile_has_extra(ptile, pextra)) {
       pplayer->server.huts++;
 
-      tile_remove_extra(ptile, pextra);
+      destroy_extra(ptile, pextra);
       update_tile_knowledge(unit_tile(punit));
 
       if (behavior == HUT_FRIGHTEN) {


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

Reply via email to