Skip to content

Commit

Permalink
Server: Backport 0077-city_freeze_workers_queue-Set-needs_arrange-for…
Browse files Browse the repository at this point in the history
…-citi.patch

Signed-off-by: Marko Lindqvist <[email protected]>
  • Loading branch information
cazfi committed May 24, 2024
1 parent 2278a86 commit 9656238
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions freeciv/apply_patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
# 0068-Meson-Make-libfreeciv-to-depend-on-gitrev.patch
# Build fix
# RM #597
# 0077-city_freeze_workers_queue-Set-needs_arrange-for-citi.patch
# City status legality fix
# RM #661

# Not in the upstream Freeciv server
# ----------------------------------
Expand Down Expand Up @@ -73,6 +76,7 @@ declare -a PATCHLIST=(
"backports/0089-Meson-Make-fc_client_common-to-depend-on-verhdr"
"backports/0080-savegame-Save-ACTION_NONE-as-1"
"backports/0068-Meson-Make-libfreeciv-to-depend-on-gitrev"
"backports/0077-city_freeze_workers_queue-Set-needs_arrange-for-citi"
"RevertAmplio2ExtraUnits"
"meson_webperimental"
"metachange"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 2af5f7de98ee8d5dcfe9dae9b524ceaa817a79b8 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <[email protected]>
Date: Wed, 22 May 2024 15:12:31 +0300
Subject: [PATCH 77/77] city_freeze_workers_queue(): Set needs_arrange for
cities already in queue

See RM #661

Signed-off-by: Marko Lindqvist <[email protected]>
---
server/citytools.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/server/citytools.c b/server/citytools.c
index d9332656e7..b687c07b74 100644
--- a/server/citytools.c
+++ b/server/citytools.c
@@ -162,6 +162,11 @@ void city_freeze_workers_queue(struct city *pcity)
if (arrange_workers_queue == nullptr) {
arrange_workers_queue = city_list_new();
} else if (city_list_find_number(arrange_workers_queue, pcity->id)) {
+ /* City might have been arranged since it was originally put to the queue.
+ * Make sure needs_arrange is set again. */
+ if (pcity->server.needs_arrange == CNA_NOT) {
+ pcity->server.needs_arrange = CNA_NORMAL;
+ }
return;
}

--
2.43.0

0 comments on commit 9656238

Please sign in to comment.