Incidencia #45894

Extra build slot units not checked for build legality

Abrir Fecha: 2022-10-17 21:03 Última actualización: 2023-09-06 21:47

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

Details

This allowed an exploit where one could "stash shields" (e.g., in a Battleship), then change to a cheap legal unit followed in the queue by a unit you can't build.

This made it possible to make Helicopters, Howitzers, and Stealth Bombers well before the tech was available!

Blamed: city_build_unit()... does check for current prod but not later worklist units. Needs an if such as

  1. /* Multislot units also need to be checked for build legality,
  2. * otherwise you can make Howitzers in the feudal age! */
  3. if (can_city_build_unit_direct(pcity, utype)) {
  4. punit = city_create_unit(pcity, utype);
  5. } else punit = NULL;

Ticket History (3/5 Histories)

2022-10-17 21:03 Updated by: None
  • New Ticket "Extra build slot units not checked for build legality" created
2022-10-17 21:31 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
Comentario

That seems like FCW specific bug as they allow build slots to produce different kind of units than what was checked for. (They have a point in that the behavior they look for makes sense, but they have removed restrictions without fixing the reasons the restrictions were there)

2022-10-20 08:20 Updated by: None
Comentario

Reply To cazfi

That seems like FCW specific bug as they allow build slots to produce different kind of units than what was checked for. (They have a point in that the behavior they look for makes sense, but they have removed restrictions without fixing the reasons the restrictions were there)

Well so far as I know this simple bug is the only reason to disallow making different kinds of units in the build slots. But please tell if there are others !

2022-10-20 21:37 Updated by: cazfi
Comentario

Reply To (Anonymous)

Well so far as I know this simple bug is the only reason to disallow making different kinds of units in the build slots. But please tell if there are others !

I have not investigated the case more thoroughly, neither in code nor from commit messages or the tickets where the build slots functionality was added like this.

2023-09-06 21:47 Updated by: cazfi
  • Propietario Update from cazfi to (Ninguno)

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Entrar