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 5d89b9ac25
commit d7f833ecfb
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
2 changed files with 4 additions and 1 deletions

View File

@ -9,8 +9,9 @@ Saves from 5.0.0 are not compatible with 5.1.0
## Fixes
* **[Mission Generation]** Fixed mission scripting error when using a dedicated server.
* **[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

@ -699,6 +699,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)