-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server: Backport 0077-city_freeze_workers_queue-Set-needs_arrange-for…
…-citi.patch Signed-off-by: Marko Lindqvist <[email protected]>
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
freeciv/patches/backports/0077-city_freeze_workers_queue-Set-needs_arrange-for-citi.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|