-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #764 from cazfi/srvup
Update to Freeciv server freeciv/freeciv@cffdf1a2ff
- Loading branch information
Showing
4 changed files
with
85 additions
and
8 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
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
69 changes: 69 additions & 0 deletions
69
freeciv/patches/backports/0050-Correct-filling-of-territory-claiming-extras-cache.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,69 @@ | ||
From 0fdd9abb1ddcd602f55f3832b50e5e4f568a2551 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Thu, 12 Oct 2023 22:23:13 +0300 | ||
Subject: [PATCH 50/50] Correct filling of territory claiming extras cache | ||
|
||
See osdn #48838 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
client/packhand.c | 10 ++++++---- | ||
server/ruleset.c | 7 ++----- | ||
2 files changed, 8 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/client/packhand.c b/client/packhand.c | ||
index 783063484c..8b913bafe0 100644 | ||
--- a/client/packhand.c | ||
+++ b/client/packhand.c | ||
@@ -4283,10 +4283,7 @@ void handle_ruleset_extra(const struct packet_ruleset_extra *p) | ||
if (extra_has_flag(pextra, EF_CAUSE_ZOC)) { | ||
extra_type_list_append(extra_type_list_of_zoccers(), pextra); | ||
} | ||
- if (is_extra_caused_by(pextra, EC_BASE) | ||
- && territory_claiming_base(extra_base_get(pextra))) { | ||
- extra_type_list_append(extra_type_list_of_terr_claimers(), pextra); | ||
- } | ||
+ | ||
pextra->hidden_by = p->hidden_by; | ||
pextra->bridged_over = p->bridged_over; | ||
pextra->conflicts = p->conflicts; | ||
@@ -4336,6 +4333,11 @@ void handle_ruleset_base(const struct packet_ruleset_base *p) | ||
pbase->vision_main_sq = p->vision_main_sq; | ||
pbase->vision_invis_sq = p->vision_invis_sq; | ||
pbase->vision_subs_sq = p->vision_subs_sq; | ||
+ | ||
+ if (territory_claiming_base(pbase)) { | ||
+ extra_type_list_append(extra_type_list_of_terr_claimers(), | ||
+ base_extra_get(pbase)); | ||
+ } | ||
} | ||
|
||
/************************************************************************//** | ||
diff --git a/server/ruleset.c b/server/ruleset.c | ||
index 75f01dd8b2..1ef4ab36dc 100644 | ||
--- a/server/ruleset.c | ||
+++ b/server/ruleset.c | ||
@@ -3773,11 +3773,6 @@ static bool load_ruleset_terrain(struct section_file *file, | ||
extra_type_list_append(extra_type_list_of_zoccers(), pextra); | ||
} | ||
|
||
- if (is_extra_caused_by(pextra, EC_BASE) | ||
- && territory_claiming_base(extra_base_get(pextra))) { | ||
- extra_type_list_append(extra_type_list_of_terr_claimers(), pextra); | ||
- } | ||
- | ||
if (!ok) { | ||
break; | ||
} | ||
@@ -4008,6 +4003,8 @@ static bool load_ruleset_terrain(struct section_file *file, | ||
} | ||
|
||
if (territory_claiming_base(pbase)) { | ||
+ extra_type_list_append(extra_type_list_of_terr_claimers(), pextra); | ||
+ | ||
extra_type_by_cause_iterate(EC_BASE, pextra2) { | ||
struct base_type *pbase2; | ||
|
||
-- | ||
2.42.0 | ||
|
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