Author: cazfi Date: Thu Aug 4 10:06:49 2016 New Revision: 33452 URL: http://svn.gna.org/viewcvs/freeciv?rev=33452&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: trunk/server/barbarian.c trunk/server/citytools.c trunk/server/gamehand.c trunk/server/generator/mapgen.c trunk/server/srv_main.c trunk/server/unittools.c Modified: trunk/server/barbarian.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/barbarian.c?rev=33452&r1=33451&r2=33452&view=diff ============================================================================== --- trunk/server/barbarian.c (original) +++ trunk/server/barbarian.c Thu Aug 4 10:06:49 2016 @@ -552,7 +552,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: trunk/server/citytools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/citytools.c?rev=33452&r1=33451&r2=33452&view=diff ============================================================================== --- trunk/server/citytools.c (original) +++ trunk/server/citytools.c Thu Aug 4 10:06:49 2016 @@ -1785,7 +1785,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: trunk/server/gamehand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/gamehand.c?rev=33452&r1=33451&r2=33452&view=diff ============================================================================== --- trunk/server/gamehand.c (original) +++ trunk/server/gamehand.c Thu Aug 4 10:06:49 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: trunk/server/generator/mapgen.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/generator/mapgen.c?rev=33452&r1=33451&r2=33452&view=diff ============================================================================== --- trunk/server/generator/mapgen.c (original) +++ trunk/server/generator/mapgen.c Thu Aug 4 10:06:49 2016 @@ -1179,7 +1179,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: trunk/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=33452&r1=33451&r2=33452&view=diff ============================================================================== --- trunk/server/srv_main.c (original) +++ trunk/server/srv_main.c Thu Aug 4 10:06:49 2016 @@ -1392,7 +1392,7 @@ if (tile_has_extra(ptile, pextra) && fc_rand(10000) < pextra->disappearance_chance && can_extra_disappear(pextra, ptile)) { - tile_remove_extra(ptile, pextra); + tile_extra_rm_apply(ptile, pextra); update_tile_knowledge(ptile); @@ -1423,7 +1423,7 @@ && fc_rand(10000) < pextra->appearance_chance && can_extra_appear(pextra, ptile)) { - tile_add_extra(ptile, pextra); + tile_extra_apply(ptile, pextra); update_tile_knowledge(ptile); Modified: trunk/server/unittools.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unittools.c?rev=33452&r1=33451&r2=33452&view=diff ============================================================================== --- trunk/server/unittools.c (original) +++ trunk/server/unittools.c Thu Aug 4 10:06:49 2016 @@ -863,7 +863,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; @@ -876,7 +876,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; @@ -2869,7 +2869,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