Ticket #45239

AI: assert "unit_transported()" failing

오픈 날짜: 2022-07-26 18:59 마지막 업데이트: 2022-08-03 18:11

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

Frequently seen with the new fantasy (not the one known by that name in earlier versions) ruleset: "unit_transported(punit)" assert in aiferry_gobyboat() is failing.

It indicates a real bug. The assert is after an attempt to load the unit to the transport. With action enablers, there's no reason to assume that such an action is possible (enabled). None of the checks done beforehand consider the possibility that action is not enabled by action enablers.

Simple fix (which we likely need to go with for now) is to replace the fc_assert() with 'return FALSE', but ultimately we will need to make AI not to plan for the impossible ferrying.

Have not tested 'return FALSE' approach yet - not sure how bad the situation is after it. It's possible that the unit then just retries to use the same transport on the next turn to the end of the game.

Ticket History (3/5 Histories)

2022-07-26 18:59 Updated by: cazfi
  • New Ticket "AI: assert "unit_transported()" failing" created
2022-07-26 20:04 Updated by: cazfi
2022-07-26 20:14 Updated by: cazfi
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-08-03 18:11 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login