Ticket #42199

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

Eröffnet am: 2021-05-08 21:35 Letztes Update: 2021-05-30 17:43

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
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-Verlauf (3/4 Historien)

2021-05-08 21:35 Aktualisiert von: cazfi
  • New Ticket "Ruleset controlled max distance to friendly city for "NoAggressive" extra" created
2021-05-09 22:00 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
Kommentar

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 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden