From 3ca91394adb26b23cffd8607931273e85d127a55 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 1 Feb 2022 19:52:13 +0200 Subject: [PATCH 31/31] Drop unused cma stuff from the network protocol Dropped - packet_city_manager - cma related fields from packet_city_info See osdn #43752 Signed-off-by: Marko Lindqvist --- common/networking/packets.def | 10 ---------- fc_version | 2 +- server/cityhand.c | 34 ---------------------------------- server/citytools.c | 8 -------- 4 files changed, 1 insertion(+), 53 deletions(-) diff --git a/common/networking/packets.def b/common/networking/packets.def index 1ec27030a7..49569f6e2e 100644 --- a/common/networking/packets.def +++ b/common/networking/packets.def @@ -207,7 +207,6 @@ type WORKLIST = worklist(struct worklist) # string that is URI encoded in the JSON protocol type ESTRING = estring(char) type UNIT_ORDER = unit_order(struct unit_order) -type CM_PARAMETER = cm_parameter(struct cm_parameter) # typedefs for enums type ACHIEVEMENT_TYPE = uint8(enum achievement_type) @@ -763,8 +762,6 @@ PACKET_CITY_INFO = 31; sc, lsend, is-game-info, force, cancel(PACKET_CITY_SHORT_ BOOL rally_point_persistent; BOOL rally_point_vigilant; UNIT_ORDER rally_point_orders[MAX_LEN_ROUTE:rally_point_length]; - BOOL cma_enabled; - CM_PARAMETER cm_parameter; end PACKET_CITY_SHORT_INFO = 32; sc, lsend, is-game-info, cancel(PACKET_CITY_INFO), cancel(PACKET_WEB_CITY_INFO_ADDITION) @@ -878,13 +875,6 @@ PACKET_CITY_RALLY_POINT = 138; cs UNIT_ORDER orders[MAX_LEN_ROUTE:length]; end -PACKET_CITY_MANAGER = 139; cs - CITY city_id; - BOOL enabled; - CM_PARAMETER parameter; -end - - PACKET_WORKER_TASK = 241; cs, sc, lsend, handle-via-packet CITY city_id; TILE tile_id; diff --git a/fc_version b/fc_version index 9008098988..8e3644bcc7 100755 --- a/fc_version +++ b/fc_version @@ -56,7 +56,7 @@ DEFAULT_FOLLOW_TAG=S3_2 # - No new mandatory capabilities can be added to the release branch; doing # so would break network capability of supposedly "compatible" releases. # -NETWORK_CAPSTRING="+Freeciv.Devel-3.2-2022.Feb.01" +NETWORK_CAPSTRING="+Freeciv.Devel-3.2-2022.Feb.01b" FREECIV_DISTRIBUTOR="" diff --git a/server/cityhand.c b/server/cityhand.c index 6a7c0e9ee8..cd7723412f 100644 --- a/server/cityhand.c +++ b/server/cityhand.c @@ -560,37 +560,3 @@ void handle_city_rally_point(struct player *pplayer, send_city_info(pplayer, pcity); } - -/**********************************************************************//** - Handles a request to set city manager parameter. -**************************************************************************/ -void handle_city_manager(struct player *pplayer, int city_id, bool enabled, - struct cm_parameter parameter) -{ - struct city *pcity = player_city_by_number(pplayer, city_id); - - if (NULL == pcity) { - /* Probably lost. */ - log_verbose("handle_city_manager() bad city number %d.", city_id); - return; - } - - if (!enabled) { - if (pcity->cm_parameter) { - free(pcity->cm_parameter); - pcity->cm_parameter = NULL; - send_city_info(pplayer, pcity); - } - return; - } - - if (!pcity->cm_parameter) { - pcity->cm_parameter = fc_calloc(1, sizeof(struct cm_parameter)); - } - - cm_copy_parameter(pcity->cm_parameter, ¶meter); - - auto_arrange_workers(pcity); - sync_cities(); - return; -} diff --git a/server/citytools.c b/server/citytools.c index 0b4bee47b2..123c6b4450 100644 --- a/server/citytools.c +++ b/server/citytools.c @@ -2549,14 +2549,6 @@ void package_city(struct city *pcity, struct packet_city_info *packet, pcity->rally_point.length * sizeof(struct unit_order)); } - if (pcity->cm_parameter) { - packet->cma_enabled = TRUE; - cm_copy_parameter(&packet->cm_parameter, pcity->cm_parameter); - } else { - packet->cma_enabled = FALSE; - memset(&packet->cm_parameter, 0, sizeof(packet->cm_parameter)); - } - BV_CLR_ALL(packet->improvements); improvement_iterate(pimprove) { if (city_has_building(pcity, pimprove)) { -- 2.34.1