-
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 0048-Make-action-selection-dialog-to-appear-on-airli…
…ft.patch Signed-off-by: Marko Lindqvist <[email protected]>
- Loading branch information
Showing
2 changed files
with
59 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
53 changes: 53 additions & 0 deletions
53
freeciv/patches/backports/0048-Make-action-selection-dialog-to-appear-on-airlift.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,53 @@ | ||
From ebfe8b397bea164ea772432304d819f1285afe35 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Tue, 29 Oct 2024 04:57:49 +0200 | ||
Subject: [PATCH 48/52] Make action selection dialog to appear on airlift | ||
|
||
Reported by Helge | ||
|
||
See RM #1028 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
server/unittools.c | 18 +++++++++--------- | ||
1 file changed, 9 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/server/unittools.c b/server/unittools.c | ||
index a7977f05e1..768e11353a 100644 | ||
--- a/server/unittools.c | ||
+++ b/server/unittools.c | ||
@@ -4142,15 +4142,6 @@ bool unit_move(struct unit *punit, struct tile *pdesttile, int move_cost, | ||
punit->action_decision_tile = NULL; | ||
punit->action_decision_want = ACT_DEC_NOTHING; | ||
|
||
- if (!adj && action_tgt_city(punit, pdesttile, FALSE)) { | ||
- /* The unit can perform an action to the city at the destination tile. | ||
- * A long distance move (like an airlift) doesn't ask what action to | ||
- * perform before moving. Ask now. */ | ||
- | ||
- punit->action_decision_want = ACT_DEC_PASSIVE; | ||
- punit->action_decision_tile = pdesttile; | ||
- } | ||
- | ||
/* Claim ownership of fortress? */ | ||
if (conquer_extras_allowed | ||
&& tile_has_claimable_base(pdesttile, unit_type_get(punit))) { | ||
@@ -4187,6 +4178,15 @@ bool unit_move(struct unit *punit, struct tile *pdesttile, int move_cost, | ||
} | ||
} | ||
|
||
+ if (!adj && action_tgt_city(punit, pdesttile, FALSE)) { | ||
+ /* The unit can perform an action to the city at the destination tile. | ||
+ * A long distance move (like an airlift) doesn't ask what action to | ||
+ * perform before moving. Ask now. */ | ||
+ | ||
+ punit->action_decision_want = ACT_DEC_PASSIVE; | ||
+ punit->action_decision_tile = pdesttile; | ||
+ } | ||
+ | ||
/* Notifications of the move to the clients. */ | ||
if (adj) { | ||
/* Special case: 'punit' is moving to adjacent position. Then we show | ||
-- | ||
2.45.2 | ||
|