任务单 #44834

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

开放日期: 2022-06-15 05:08 最后更新: 2022-06-23 22:34

报告人:
属主:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
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.

任务单历史 (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
评论

Patched.

2022-06-18 16:06 Updated by: cazfi
评论

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
评论

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
评论

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
评论

Fixed, also, centralized the conditions a bit.

2022-06-20 05:15 Updated by: cazfi
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
2022-06-23 22:34 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

Attachment File List

编辑

Please login to add comment to this ticket » 登录名