Skip to content

Commit 30ad0fc

Browse files
authored
Merge pull request #877 from cazfi/srvup
2 parents dd4409f + cf77708 commit 30ad0fc

4 files changed

+50
-5
lines changed

freeciv/apply_patches.sh

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# 0048-Make-action-selection-dialog-to-appear-on-airlift.patch
1313
# Action list popup fix
1414
# RM #1028
15+
# 0045-unit_server_side_agent_set-Send-unit-info-only-if-ss.patch
16+
# Focus unit fix
17+
# RM #1104
1518

1619
# Not in the upstream Freeciv server
1720
# ----------------------------------
@@ -34,6 +37,7 @@ declare -a GIT_PATCHLIST=(
3437
declare -a PATCHLIST=(
3538
"backports/0046-Fix-combat-veterancy-chance"
3639
"backports/0048-Make-action-selection-dialog-to-appear-on-airlift"
40+
"backports/0045-unit_server_side_agent_set-Send-unit-info-only-if-ss"
3741
"RevertAmplio2ExtraUnits"
3842
"meson_webperimental"
3943
"metachange"

freeciv/patches/RevertAmplio2ExtraUnits.patch

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/data/amplio2/extra_units.spec b/data/amplio2/extra_units.spec
2-
index 97457e7063..8890179983 100644
2+
index 92c2baa7ca..4c9d1523d8 100644
33
--- a/data/amplio2/extra_units.spec
44
+++ b/data/amplio2/extra_units.spec
5-
@@ -26,105 +26,27 @@ dy = 48
5+
@@ -26,105 +26,25 @@ dy = 48
66
pixel_border = 1
77

88
tiles = { "row", "column", "tag"
@@ -111,8 +111,7 @@ index 97457e7063..8890179983 100644
111111
- 10, 10, "u.elephant_Idle"
112112
- 10, 11, "u.polar_bear_Idle"
113113
- 10, 12, "u.squid_Idle"
114-
+
115-
10, 13, "u.storm_Idle"
114+
-
116115
- 10, 14, "u.mammoth_Idle"
117116
+
118117
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From 384543aee1c82ad874ded6da78e632d514ad58f9 Mon Sep 17 00:00:00 2001
2+
From: Marko Lindqvist <[email protected]>
3+
Date: Mon, 11 Nov 2024 05:09:02 +0200
4+
Subject: [PATCH 45/78] unit_server_side_agent_set(): Send unit info only if
5+
ssa_agent really changed
6+
7+
Saves some CPU cycles. More importantly for now mitigates
8+
a problem that when a unit with an activity is selected on
9+
the client side, it won't stay on focus if server sends
10+
this unit info packet before the activity has been cleared
11+
to be ACTIVITY_IDLE.
12+
13+
Focus problems reported by bard and Helge
14+
15+
See RM #1104
16+
17+
Signed-off-by: Marko Lindqvist <[email protected]>
18+
---
19+
server/unithand.c | 7 ++++---
20+
1 file changed, 4 insertions(+), 3 deletions(-)
21+
22+
diff --git a/server/unithand.c b/server/unithand.c
23+
index a449223d83..87e51052d7 100644
24+
--- a/server/unithand.c
25+
+++ b/server/unithand.c
26+
@@ -6585,9 +6585,10 @@ bool unit_server_side_agent_set(struct player *pplayer,
27+
break;
28+
}
29+
30+
- punit->ssa_controller = agent;
31+
-
32+
- send_unit_info(NULL, punit);
33+
+ if (punit->ssa_controller != agent) {
34+
+ punit->ssa_controller = agent;
35+
+ send_unit_info(NULL, punit);
36+
+ }
37+
38+
return TRUE;
39+
}
40+
--
41+
2.45.2
42+

freeciv/version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The Git SHA hash for the commit to checkout from
22
# https://github.com/freeciv/freeciv
33

4-
FCREV=ccddb209ef986da35b737e797b856bd9e144e3b8
4+
FCREV=dc977345b1519d409318e3aaa4d7711765f689b7
55

66
ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.June.08"
77

0 commit comments

Comments
 (0)