Ticket #44834

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

Eröffnet am: 2022-06-15 05:08 Letztes Update: 2022-06-23 22:34

Auswertung:
Verantwortlicher:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
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-Verlauf (3/11 Historien)

2022-06-15 05:08 Aktualisiert von: 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 Aktualisiert von: ihnatus
  • File edit-create_unit_full-to-unboardable.patch (File ID: 9532) is attached
2022-06-18 15:18 Aktualisiert von: ihnatus
Kommentar

Patched.

2022-06-18 16:06 Aktualisiert von: cazfi
Kommentar

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 Aktualisiert von: ihnatus
Kommentar

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 Aktualisiert von: cazfi
Kommentar

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 Aktualisiert von: ihnatus
  • File edit-create_unit_full-to-unboardable.patch (File ID: 9532) is deleted
2022-06-20 04:58 Aktualisiert von: ihnatus
Kommentar

Fixed, also, centralized the conditions a bit.

2022-06-20 05:15 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
2022-06-23 22:34 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden