From 06887503d20bd5f4570611f6693149ae23980f7c Mon Sep 17 00:00:00 2001
From: John Robertson <jro@advops.com>
Date: Sun, 11 Jan 2026 16:10:01 -0700
Subject: [PATCH] workers on sentry within a city should wakeup as autoworkers
 when the radius of a city grows

---
 server/citytools.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/server/citytools.c b/server/citytools.c
index 1c1bb7b2c6..ae0f8dfb12 100644
--- a/server/citytools.c
+++ b/server/citytools.c
@@ -3517,6 +3517,15 @@ bool city_map_update_radius_sq(struct city *pcity)
   city_map_radius_sq_set(pcity, city_radius_sq_new);
 
   if (city_tiles_old < city_tiles_new) {
+    unit_list_iterate((city_tile(pcity))->units, punit) {
+      if (unit_has_type_flag(punit, UTYF_WORKERS)
+        && punit->activity == ACTIVITY_SENTRY) {
+        punit->ssa_controller = SSA_AUTOWORKER;
+        send_unit_info(NULL, punit);
+      }
+    }
+    unit_list_iterate_end;
+
     /* Increased number of city tiles */
     city_refresh_vision(pcity);
   } else {
-- 
2.43.0

