Fix empty convoy when transfer is not completable

fixes #1553
This commit is contained in:
RndName 2021-12-13 20:42:33 +01:00
parent 2c21644a2c
commit c643adf57b
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ Saves from 5.x are not compatible with 6.0.
* **[Mission Generator]** Fixed incorrect radio specification for the AN/ARC-222.
* **[Mission Generator]** Fixed mission scripting error when using a dedicated server.
* **[Mission Generator]** Fixed an issue where empty convoys lead to an index error when a point capture made a pending transfer of units not completable anymore.
# 5.0.0

View File

@ -700,6 +700,8 @@ class PendingTransfers:
completable_transfers = []
for transfer in self.pending_transfers:
if not transfer.is_completable(self.network_for(transfer.position)):
if transfer.transport:
self.cancel_transport(transfer.transport, transfer)
transfer.disband()
else:
completable_transfers.append(transfer)