Maintain map of vehicle order destinations refcounts, by type

This commit is contained in:
Jonathan G Rennison
2019-05-12 04:24:10 +01:00
parent 8a4ba9f9c1
commit 8196789eeb
5 changed files with 77 additions and 0 deletions

View File

@@ -314,6 +314,8 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
assert(old_owner != _local_company);
}
ClearOrderDestinationRefcountMap();
Town *t;
assert(old_owner != new_owner);
@@ -589,6 +591,8 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
/* Change owner of deferred cargo payments */
ChangeOwnershipOfCargoPacketDeferredPayments(old_owner, new_owner);
IntialiseOrderDestinationRefcountMap();
cur_company.Restore();
MarkWholeScreenDirty();