Feature #361 » 0057-Unhardcode-wld.map-from-caravan_find_best_destinatio.patch
ai/default/daiunit.c | ||
---|---|---|
parameter.allow_foreign_trade = FTL_NATIONAL_ONLY;
|
||
parameter.ignore_transit_time = FALSE;
|
||
}
|
||
caravan_find_best_destination(punit, ¶meter, &result, !has_handicap(pplayer, H_MAP));
|
||
caravan_find_best_destination(nmap, punit, ¶meter, &result,
|
||
!has_handicap(pplayer, H_MAP));
|
||
if (result.dest != NULL) {
|
||
/* we did find a new destination for the unit */
|
||
/* We did find a new destination for the unit */
|
||
dest = result.dest;
|
||
help_wonder = result.help_wonder;
|
||
required_boat = uclass_need_trans_between(pclass, unit_tile(punit), dest->tile);
|
common/aicore/caravan.c | ||
---|---|---|
Store it in *destout (if destout is non-null); return the value of the
|
||
trade route.
|
||
****************************************************************************/
|
||
void caravan_find_best_destination(const struct unit *caravan,
|
||
void caravan_find_best_destination(const struct civ_map *nmap,
|
||
const struct unit *caravan,
|
||
const struct caravan_parameter *parameter,
|
||
struct caravan_result *result, bool omniscient)
|
||
{
|
||
const struct civ_map *nmap = &(wld.map);
|
||
if (parameter->ignore_transit_time) {
|
||
caravan_find_best_destination_notransit(caravan, parameter, result);
|
||
} else {
|
common/aicore/caravan.h | ||
---|---|---|
int caravan_result_compare(const struct caravan_result *a,
|
||
const struct caravan_result *b);
|
||
void caravan_find_best_destination(const struct unit *caravan,
|
||
void caravan_find_best_destination(const struct civ_map *nmap,
|
||
const struct unit *caravan,
|
||
const struct caravan_parameter *parameter,
|
||
struct caravan_result *result, bool omniscient);
|
||