From 2aff52f736c06cc912a6985013d182bb46bacf54 Mon Sep 17 00:00:00 2001
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Date: Sat, 14 Nov 2026 13:55:25 -0800
Subject: [PATCH] settler_map_iterate(): Consider the tile the settler stands
 on

The site search iterates pf_map_move_costs_iterate() with
COND_from_start FALSE, which skips the start tile. A settler standing
on the best site never rates it, and walks to a neighbouring tile to
found a turn later on a worse one. Every AI settler does that at game
start, on the start position the generator picked.

Iterate from the start tile. turns is 0 there, so the site gets its
full value.

See RM #2495

Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
---
 ai/default/daisettler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c
index 4caca72142..1bce83acfb 100644
--- a/ai/default/daisettler.c
+++ b/ai/default/daisettler.c
@@ -814,7 +814,7 @@ static struct cityresult *settler_map_iterate(struct ai_type *ait,
   int cost = unit_build_shield_cost_base(punit);
 
   pfm = pf_map_new(parameter);
-  pf_map_move_costs_iterate(pfm, ptile, move_cost, FALSE) {
+  pf_map_move_costs_iterate(pfm, ptile, move_cost, TRUE) {
     int turns;
 
     if (boat_cost == 0 && pclass->adv.sea_move == MOVE_NONE
-- 
2.55.0

