Ticket #42199

Ruleset controlled max distance to friendly city for "NoAggressive" extra

오픈 날짜: 2021-05-08 21:35 마지막 업데이트: 2021-05-30 17:43

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

"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.

Ticket History (3/4 Histories)

2021-05-08 21:35 Updated by: cazfi
  • New Ticket "Ruleset controlled max distance to friendly city for "NoAggressive" extra" created
2021-05-09 22:00 Updated by: cazfi
  • Resolution Update from None to Accepted
댓글 올리기

Attached patch defines the distance per extra, i.e., different extras in the same ruleset can have a different value.

2021-05-30 17:43 Updated by: cazfi
  • Status Update from Open to Closed
  • 소유자 Update from (None) to cazfi
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login