Incidencia #44834

Lua: allow create_unit_full() to place a unit in a transport it can't freely load

Abrir Fecha: 2022-06-15 05:08 Última actualización: 2022-06-23 22:34

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

Details

There is no problem if a unit can't load its ttttransport in the place it is. I would mark it a bug and target to 3.0 but without #44738 it's too difficult to do.

Ticket History (3/11 Histories)

2022-06-15 05:08 Updated by: ihnatus
  • New Ticket "Lua: allow create_unit_full() to place a unit in a transport it can't freely load" created
2022-06-18 15:18 Updated by: ihnatus
  • File edit-create_unit_full-to-unboardable.patch (File ID: 9532) is attached
2022-06-18 15:18 Updated by: ihnatus
Comentario

Patched.

2022-06-18 16:06 Updated by: cazfi
Comentario

As 'placed' is only used within assert, I think it will cause "set, but unused variable" -warning on FREECIV_NDEBUG build.

2022-06-18 19:59 Updated by: ihnatus
Comentario

Reply To cazfi

As 'placed' is only used within assert, I think it will cause "set, but unused variable" -warning on FREECIV_NDEBUG build.

What you think should I do, use #ifdef FREECIV_NDEBUG preprocessor branching? I likely have used place_unit() that way in some previous patch.

2022-06-18 20:04 Updated by: cazfi
Comentario

Reply To ihnatus

Reply To cazfi

As 'placed' is only used within assert, I think it will cause "set, but unused variable" -warning on FREECIV_NDEBUG build.

What you think should I do, use #ifdef FREECIV_NDEBUG preprocessor branching? I likely have used place_unit() that way in some previous patch.

That's what we use in other places. A lot of those went in recently in #43868.

2022-06-20 04:57 Updated by: ihnatus
  • File edit-create_unit_full-to-unboardable.patch (File ID: 9532) is deleted
2022-06-20 04:58 Updated by: ihnatus
Comentario

Fixed, also, centralized the conditions a bit.

2022-06-20 05:15 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-06-23 22:34 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Attachment File List

Editar

Please login to add comment to this ticket » Entrar