From 27d40655da1999695f3a891e9f494f81b3345b91 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 25 Oct 2024 22:46:47 +0300 Subject: [PATCH] Update to Freeciv server freeciv/freeciv@86394b498f Signed-off-by: Marko Lindqvist --- freeciv/apply_patches.sh | 4 - .../0080-savegame-Save-ACTION_NONE-as-1.patch | 113 ------------------ freeciv/version.txt | 4 +- 3 files changed, 2 insertions(+), 119 deletions(-) delete mode 100644 freeciv/patches/backports/0080-savegame-Save-ACTION_NONE-as-1.patch diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index ad1471b21..cee81512a 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -6,9 +6,6 @@ # https://osdn.net/projects/freeciv/ticket/????? # https://redmine.freeciv.org/issues/??? # -# 0080-savegame-Save-ACTION_NONE-as-1.patch -# Savegame loading fix -# RM #598 # 0074-Meson-Make-fc_server-to-depend-on-verhdr.patch # Build fix # RM #682 @@ -47,7 +44,6 @@ declare -a GIT_PATCHLIST=( ) declare -a PATCHLIST=( - "backports/0080-savegame-Save-ACTION_NONE-as-1" "backports/0074-Meson-Make-fc_server-to-depend-on-verhdr" "backports/0077-city_freeze_workers_queue-Set-needs_arrange-for-citi" "backports/0068-AI-Remove-shared-vision-from-pending-war-target-once" diff --git a/freeciv/patches/backports/0080-savegame-Save-ACTION_NONE-as-1.patch b/freeciv/patches/backports/0080-savegame-Save-ACTION_NONE-as-1.patch deleted file mode 100644 index 3c767959d..000000000 --- a/freeciv/patches/backports/0080-savegame-Save-ACTION_NONE-as-1.patch +++ /dev/null @@ -1,113 +0,0 @@ -From c902b55fde30f4d24d7bbd95fce4fbe5f6281e03 Mon Sep 17 00:00:00 2001 -From: Marko Lindqvist -Date: Sun, 12 May 2024 11:21:28 +0300 -Subject: [PATCH 80/80] savegame: Save ACTION_NONE as -1 - -See RM #598 - -Signed-off-by: Marko Lindqvist ---- - server/savegame/savecompat.c | 4 ++-- - server/savegame/savegame3.c | 26 +++++++++++++++++++++----- - 2 files changed, 23 insertions(+), 7 deletions(-) - -diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c -index 322aae8644..152b756cb3 100644 ---- a/server/savegame/savecompat.c -+++ b/server/savegame/savecompat.c -@@ -2556,7 +2556,7 @@ static void compat_load_030300(struct loaddata *loading, - } - - if (!found) { -- secfile_insert_int(loading->file, ACTION_NONE, "player%d.u%d.action", -+ secfile_insert_int(loading->file, -1, "player%d.u%d.action", - plrno, unro); - } - } -@@ -3439,7 +3439,7 @@ static void compat_load_dev(struct loaddata *loading) - } - - if (!found) { -- secfile_insert_int(loading->file, ACTION_NONE, "player%d.u%d.action", -+ secfile_insert_int(loading->file, -1, "player%d.u%d.action", - plrno, unro); - } - } -diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c -index 137a990700..8c349fc295 100644 ---- a/server/savegame/savegame3.c -+++ b/server/savegame/savegame3.c -@@ -5502,11 +5502,13 @@ static bool sg_load_player_city(struct loaddata *loading, struct player *plr, - order->dir = char2dir(rally_dirs[i]); - order->activity = char2activity(rally_activities[i]); - -- unconverted = secfile_lookup_int_default(loading->file, ACTION_NONE, -+ unconverted = secfile_lookup_int_default(loading->file, -1, - "%s.rally_point_action_vec,%d", - citystr, i); - -- if (unconverted >= 0 && unconverted < loading->action.size) { -+ if (unconverted == -1) { -+ order->action = ACTION_NONE; -+ } else if (unconverted >= 0 && unconverted < loading->action.size) { - /* Look up what action id the unconverted number represents. */ - order->action = loading->action.order[unconverted]; - } else { -@@ -5910,6 +5912,10 @@ static void sg_save_player_cities(struct savedata *saving, - case ORDER_LAST: - break; - } -+ -+ if (actions[j] == ACTION_NONE) { -+ actions[j] = -1; -+ } - } - orders[len] = dirs[len] = activities[len] = '\0'; - -@@ -6197,7 +6203,7 @@ static bool sg_load_player_unit(struct loaddata *loading, - sg_warn_ret_val(secfile_lookup_int(loading->file, &ei, - "%s.action", unitstr), FALSE, - "%s", secfile_error()); -- if (ei == ACTION_NONE) { -+ if (ei == -1) { - action = ACTION_NONE; - } else { - action = loading->action.order[ei]; -@@ -6454,7 +6460,9 @@ static bool sg_load_player_unit(struct loaddata *loading, - "%s.action_vec,%d", - unitstr, j); - -- if (unconverted >= 0 && unconverted < loading->action.size) { -+ if (unconverted == -1) { -+ order->action = ACTION_NONE; -+ } else if (unconverted >= 0 && unconverted < loading->action.size) { - /* Look up what action id the unconverted number represents. */ - order->action = loading->action.order[unconverted]; - } else { -@@ -6725,7 +6733,11 @@ static void sg_save_player_units(struct savedata *saving, - secfile_insert_int(saving->file, punit->activity, "%s.activity", buf); - secfile_insert_int(saving->file, punit->activity_count, - "%s.activity_count", buf); -- secfile_insert_int(saving->file, punit->action, "%s.action", buf); -+ if (punit->action == ACTION_NONE) { -+ secfile_insert_int(saving->file, -1, "%s.action", buf); -+ } else { -+ secfile_insert_int(saving->file, punit->action, "%s.action", buf); -+ } - if (punit->activity_target == NULL) { - secfile_insert_int(saving->file, -1, "%s.activity_tgt", buf); - } else { -@@ -6857,6 +6869,10 @@ static void sg_save_player_units(struct savedata *saving, - case ORDER_LAST: - break; - } -+ -+ if (action_buf[j] == ACTION_NONE) { -+ action_buf[j] = -1; -+ } - } - orders_buf[len] = dir_buf[len] = act_buf[len] = '\0'; - --- -2.43.0 - diff --git a/freeciv/version.txt b/freeciv/version.txt index ecdd98c17..3988599b1 100644 --- a/freeciv/version.txt +++ b/freeciv/version.txt @@ -1,9 +1,9 @@ # The Git SHA hash for the commit to checkout from # https://github.com/freeciv/freeciv -FCREV=2fd8569abbc9455f0e5bafb11412734b0b0f250b +FCREV=86394b498f81c04248b1c08225033f329a6593e5 -ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.May.26" +ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.June.04" # There's no need to bump this constantly as current freeciv-web # makes no connections to outside world - all connections are