"NoAggressive" extra flag is functional when the distance to nearest friendly city is 3 or less. That '3' is hardcoded. Earlier I've been hesitant to unhardcode it because I've been concerned of the performance impact of iterating over larger area of map to look for the city.
As the code stands in current master, that iteration is done only when unit is already known to be on such an extra (i.e. rarely). That even includes the fact that the extra is native to the unit (i.e. the iteration is not done even if the tile has such an extra, if the unit is not affected by it). Increasing the distance somewhat wouldn't have big performance impact.
"NoAggressive" extra flag is functional when the distance to nearest friendly city is 3 or less. That '3' is hardcoded. Earlier I've been hesitant to unhardcode it because I've been concerned of the performance impact of iterating over larger area of map to look for the city.
As the code stands in current master, that iteration is done only when unit is already known to be on such an extra (i.e. rarely). That even includes the fact that the extra is native to the unit (i.e. the iteration is not done even if the tile has such an extra, if the unit is not affected by it). Increasing the distance somewhat wouldn't have big performance impact.