Project

General

Profile

Bug #1695 ยป 1695.patch

John Robertson, 09/29/2025 04:03 AM

View differences:

ai/default/daiunit.c
CHECK_UNIT(punit);
if (dest) {
if (dest && punit->goto_tile != nullptr) {
ptile = punit->goto_tile;
} else {
ptile = unit_tile(punit);
......
invasion_funct(ait, aunit, TRUE, 0,
(unit_can_take_over(aunit)
? INVASION_OCCUPY : INVASION_ATTACK));
if ((pcity = tile_city(aunit->goto_tile))) {
if (aunit->goto_tile != nullptr
&& (pcity = tile_city(aunit->goto_tile))) {
struct ai_city *city_data = def_ai_city_data(pcity, ait);
city_data->attack += adv_unit_att_rating(aunit);
    (1-1/1)