Incidencia #45239

AI: assert "unit_transported()" failing

Abrir Fecha: 2022-07-26 18:59 Última actualización: 2022-08-03 18:11

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
1

Details

Frequently seen with the new fantasy (not the one known by that name in earlier versions) ruleset: "unit_transported(punit)" assert in aiferry_gobyboat() is failing.

It indicates a real bug. The assert is after an attempt to load the unit to the transport. With action enablers, there's no reason to assume that such an action is possible (enabled). None of the checks done beforehand consider the possibility that action is not enabled by action enablers.

Simple fix (which we likely need to go with for now) is to replace the fc_assert() with 'return FALSE', but ultimately we will need to make AI not to plan for the impossible ferrying.

Have not tested 'return FALSE' approach yet - not sure how bad the situation is after it. It's possible that the unit then just retries to use the same transport on the next turn to the end of the game.

Ticket History (3/5 Histories)

2022-07-26 18:59 Updated by: cazfi
  • New Ticket "AI: assert "unit_transported()" failing" created
2022-07-26 20:04 Updated by: cazfi
2022-07-26 20:14 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-08-03 18:11 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar