Incidencia #42199

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

Abrir Fecha: 2021-05-08 21:35 Última actualización: 2021-05-30 17:43

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Hito:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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
  • Resolución Update from Ninguno to Accepted
Comentario

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
  • Estado Update from Open to Cerrado
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar