Project

General

Profile

Bug #1639 » 0006-Pass-city-anarchy-and-rapture-information-to-client.patch

S3_2 - Marko Lindqvist, 09/10/2025 06:32 PM

View differences:

client/packhand.c
pcity->was_happy = packet->was_happy;
pcity->had_famine = packet->had_famine;
if (has_capability("hap2clnt", client.conn.capability)) {
pcity->anarchy = packet->anarchy;
pcity->rapture = packet->rapture;
}
pcity->turn_founded = packet->turn_founded;
pcity->turn_last_built = packet->turn_last_built;
......
pcity->client.happy = packet->happy;
pcity->client.unhappy = packet->unhappy;
pcity->rapture = 0;
pcity->anarchy = 0;
improvement_iterate(pimprove) {
/* Don't update the non-visible improvements, they could hide the
* previously seen information about the city (diplomat investigation).
common/networking/packets.def
BOOL did_buy, did_sell, was_happy;
BOOL had_famine;
UINT16 anarchy; add-cap(hap2clnt)
UINT16 rapture; add-cap(hap2clnt)
BOOL diplomat_investigate;
UINT8 walls;
SINT8 city_image;
fc_version
# - No new mandatory capabilities can be added to the release branch; doing
# so would break network capability of supposedly "compatible" releases.
#
NETWORK_CAPSTRING="+Freeciv-3.2-network ownernull16 unignoresync tu32"
NETWORK_CAPSTRING="+Freeciv-3.2-network ownernull16 unignoresync tu32 hap2clnt"
# If you are distributing freeciv, and apply any patches at all,
# patch also this field to contain your identification.
server/citytools.c
packet->was_happy = pcity->was_happy;
packet->had_famine = pcity->had_famine;
packet->anarchy = pcity->anarchy;
packet->rapture = pcity->rapture;
packet->walls = city_citywalls_gfx(pcity);
packet->style = pcity->style;
packet->city_image = get_city_bonus(pcity, EFT_CITY_IMAGE);
(4-4/4)