Incidencia #48739

actres_possible() should iterate unit cargo, not tile units

Abrir Fecha: 2023-09-28 15:03 Última actualización: 2023-09-28 15:03

Informador:
Propietario:
(Ninguno)
Tipo:
Estado:
Open
Componente:
Hito:
(Ninguno)
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Ninguno
Fichero:
Ninguno

Details

actres_possible() ACTRES_MOVE_UNIT handling:

    /* We cannot move a transport into a tile that holds
     * units or cities not allied with ani of our cargo. */
    if (get_transporter_capacity(actor->unit) > 0) {
      unit_list_iterate(unit_tile(actor->unit)->units, pcargo) {
        if (unit_contained_in(pcargo, actor->unit)
            && (is_non_allied_unit_tile(target->tile, unit_owner(pcargo))
                || is_non_allied_city_tile(target->tile,
                                           unit_owner(pcargo)))) {
           return TRI_NO;
        }
      } unit_list_iterate_end;
    }

That should be simply iteration over actor's cargo.

Ticket History (1/1 Histories)

2023-09-28 15:03 Updated by: cazfi
  • New Ticket "actres_possible() should iterate unit cargo, not tile units" created

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Entrar