Project

General

Profile

Bug #2137 ยป 0048-Maintain-aarea-cities-at-the-client-side.patch

Marko Lindqvist, 08/16/2026 06:22 PM

View differences:

client/packhand.c
aarea = fc_malloc(sizeof(struct access_area));
aarea->cities = nullptr;
aarea->cities = city_list_new();
aarea->index = packet->index;
aarea->capital = packet->capital;
aarea->tiledefs = packet->tiledefs;
......
fc_assert(pcity->aarea == nullptr);
pcity->aarea = aarea;
city_list_append(aarea->cities, pcity);
break;
}
} aarea_list_iterate_end;
common/city.c
/* Free rally points */
city_rally_point_clear(pcity);
if (pcity->aarea != nullptr) {
city_list_remove(pcity->aarea->cities, pcity);
pcity->aarea = nullptr;
}
unit_list_destroy(pcity->units_supported);
trade_route_list_destroy(pcity->routes);
if (pcity->tile_cache != nullptr) {
    (1-1/1)