Bug #2509 » 0001-AI-Shelter-auto-worker-if-no-tile-to-improve.patch
| ai/default/daisettler.c | ||
|---|---|---|
|
fc_assert(result == nullptr);
|
||
|
dai_unit_new_task(ait, punit, AIUNIT_NONE, nullptr);
|
||
|
adv_seek_shelter(nmap, punit, AUT_AUTO_WORKER);
|
||
|
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,
|
||
|
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) {
|
||