Lua: allow create_unit_full() to place a unit in a transport it can't freely load
Patched.
As 'placed' is only used within assert, I think it will cause "set, but unused variable" -warning on FREECIV_NDEBUG build.
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.
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.
Fixed, also, centralized the conditions a bit.
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.