Project

General

Profile

Bug #2509 » 0001-AI-Shelter-auto-worker-stuck-in-non-allied-territory.patch

Frostblade metablaster, 12/02/2026 04:14 PM

View differences:

ai/default/daisettler.c
fc_assert(result == nullptr);
dai_unit_new_task(ait, punit, AIUNIT_NONE, nullptr);
adv_seek_shelter(nmap, punit, AUT_NONE);
goto CLEANUP;
}
} else {
......
adv_unit_new_task(punit, AUT_AUTO_WORKER, best_tile);
}
if (best_tile != nullptr
&& auto_worker_setup_work(nmap, pplayer, punit, state, 0, &path,
best_tile, best_act, &best_target,
completion_time)) {
if (best_tile == nullptr) {
adv_seek_shelter(nmap, punit, AUT_AUTO_WORKER);
} else if (auto_worker_setup_work(nmap, pplayer, punit, state, 0, &path,
best_tile, best_act, &best_target,
completion_time)) {
if (pcity != nullptr) {
clear_worker_tasks(pcity);
}
(5-5/5)