Follow-up Comment #4, bug #18529 (project freeciv): Confirmed that my "simplest" fix doesn't help when building a city on top of a fortress.
It seems the only safe time to do the destroy_base() is before the city is created, or at any rate before tile_set_worked(ptile, pcity) (which "plumbs it in" to the tile), because destroy_base() can call map_clear_border(), which calls tile_border_source_radius_sq(), which picks up on the city if it exists at that point rather than the base. (There's probably a different bug if more than one border claiming base is on a tile and one is destroyed, too.) Attached patch (which I'll commit immediately) calls destroy_base() before even create_city_virtual(), because that's most obviously safe. It might lead to unnecessary vision updates sent to clients as the vision source is removed and a different one reinstated, but I suspect it's a major rework to optimise that. (IMO the borders and vision stuff needs a good cleaning; I've had at least one project stall due to getting tangled up in it.) (file #14023, file #14024) _______________________________________________________ Additional Item Attachment: File name: S2_3-build-city-destroy-base-quickfix.diff Size:1 KB File name: trunk-build-city-destroy-base-quickfix.diff Size:1 KB _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?18529> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freecivemail@example.com https://mail.gna.org/listinfo/freeciv-dev