-
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.
Merge pull request #834 from cazfi/srvup
- Loading branch information
Showing
4 changed files
with
75 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
32 changes: 32 additions & 0 deletions
32
freeciv/patches/backports/0050-Initialize-extra-before-calling-unit_assign_specific.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 395d7098cff931e9e6ef07c9d0eace5aa47bf864 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Wed, 17 Apr 2024 00:35:05 +0300 | ||
Subject: [PATCH 50/50] Initialize extra before calling | ||
unit_assign_specific_activity_target() | ||
|
||
If the extra going in is not NULL, it's assumed to be ok to begin with, | ||
and no real extra gets assigned. | ||
|
||
See RM #460 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
server/actiontools.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/server/actiontools.c b/server/actiontools.c | ||
index 590a46a215..2f6da9ade6 100644 | ||
--- a/server/actiontools.c | ||
+++ b/server/actiontools.c | ||
@@ -906,7 +906,7 @@ int action_sub_target_id_for_action(const struct action *paction, | ||
case ASTK_EXTRA_NOT_THERE: | ||
if (action_has_result(paction, ACTRES_PILLAGE)) { | ||
/* Special treatment for "Pillage" */ | ||
- struct extra_type *pextra; | ||
+ struct extra_type *pextra = NULL; | ||
enum unit_activity activity = action_get_activity(paction); | ||
|
||
unit_assign_specific_activity_target(actor_unit, &activity, &pextra); | ||
-- | ||
2.43.0 | ||
|
33 changes: 33 additions & 0 deletions
33
freeciv/patches/backports/0050-savegame-Fix-loading-invalid-resources-on-FoW-map.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,33 @@ | ||
From 8d719e330a4c48024f50026f3053d15c828b2dd3 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Wed, 17 Apr 2024 20:51:26 +0300 | ||
Subject: [PATCH 50/50] savegame: Fix loading invalid resources on FoW map | ||
|
||
See RM #463 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
server/savegame/savegame3.c | 6 ++++-- | ||
1 file changed, 4 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c | ||
index de2fa885a3..875839dec0 100644 | ||
--- a/server/savegame/savegame3.c | ||
+++ b/server/savegame/savegame3.c | ||
@@ -7160,9 +7160,11 @@ static void sg_load_player_vision(struct loaddata *loading, | ||
struct player_tile *plrtile = map_get_player_tile(ptile, plr); | ||
|
||
extra_type_by_cause_iterate(EC_RESOURCE, pres) { | ||
- if (BV_ISSET(plrtile->extras, extra_number(pres)) | ||
- && terrain_has_resource(plrtile->terrain, pres)) { | ||
+ if (BV_ISSET(plrtile->extras, extra_number(pres))) { | ||
plrtile->resource = pres; | ||
+ if (!terrain_has_resource(plrtile->terrain, pres)) { | ||
+ BV_CLR(plrtile->extras, extra_number(pres)); | ||
+ } | ||
} | ||
} extra_type_by_cause_iterate_end; | ||
} whole_map_iterate_end; | ||
-- | ||
2.43.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