-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server: Backport 0026-savecompat-Add-wlcb-for-all-cities.patch
Signed-off-by: Marko Lindqvist <[email protected]>
- Loading branch information
Showing
2 changed files
with
47 additions
and
2 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
41 changes: 41 additions & 0 deletions
41
freeciv/patches/backports/0026-savecompat-Add-wlcb-for-all-cities.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,41 @@ | ||
From 8630ed0993437f5cd3b15aa7f3363c4421d8519a Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Mon, 8 Jan 2024 06:53:37 +0200 | ||
Subject: [PATCH 26/26] savecompat: Add wlcb for all cities | ||
|
||
It's a mandatory field, so failure to add it for non-conquered | ||
cities lead to savegame loading failure. | ||
|
||
See RM #143 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
server/savegame/savecompat.c | 7 ++++--- | ||
1 file changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c | ||
index 26b1d1e7cb..93bbab9f8e 100644 | ||
--- a/server/savegame/savecompat.c | ||
+++ b/server/savegame/savecompat.c | ||
@@ -2375,14 +2375,15 @@ static void compat_load_030200(struct loaddata *loading, | ||
secfile_insert_int(loading->file, CACQ_CONQUEST, | ||
"player%d.c%d.acquire_t", | ||
plrno, cnro); | ||
- secfile_insert_int(loading->file, WLCB_SMART, | ||
- "player%d.c%d.wlcb", | ||
- plrno, cnro); | ||
} else { | ||
secfile_insert_int(loading->file, CACQ_FOUNDED, | ||
"player%d.c%d.acquire_t", | ||
plrno, cnro); | ||
} | ||
+ | ||
+ secfile_insert_int(loading->file, WLCB_SMART, | ||
+ "player%d.c%d.wlcb", | ||
+ plrno, cnro); | ||
} | ||
} | ||
|
||
-- | ||
2.43.0 | ||
|