<URL: http://bugs.freeciv.org/Ticket/Display.html?id=37283 >
Use tile_remove_base() to remove base from tile instead of modifying
specials directly in pillage code.
- ML
diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c 2007-02-28 23:02:37.000000000 +0200
+++ freeciv/server/unittools.c 2007-03-01 20:51:42.000000000 +0200
@@ -672,10 +672,11 @@
punit->activity_target) >= 1) {
enum tile_special_type what_pillaged = punit->activity_target;
- /* FIXME: If pillaging some kind of base, should not
- * touch specials directly but to use base related
- * functions. */
- tile_clear_special(ptile, what_pillaged);
+ if (what_pillaged == S_FORTRESS || what_pillaged == S_AIRBASE) {
+ tile_remove_base(ptile);
+ } else {
+ tile_clear_special(ptile, what_pillaged);
+ }
unit_list_iterate (ptile->units, punit2) {
if ((punit2->activity == ACTIVITY_PILLAGE) &&
(punit2->activity_target == what_pillaged)) {
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev