Delay vehicle cache init to after map upgrades in load

Split AfterLoadVehicles into two functions.
Vehicle cache init and other functionality requiring an upgraded and
valid map is now performed later in the load process.

Re-order load update for SLV_139, it is no longer required to be
performed before the first phase of vehicle updates
This commit is contained in:
Jonathan G Rennison
2024-07-01 23:40:11 +01:00
parent f5b0874c1c
commit a99e6b5082
8 changed files with 56 additions and 41 deletions

View File

@@ -890,7 +890,7 @@ static_assert(DispatchSchedule::DEPARTURE_TAG_COUNT == 1 + (DispatchSlot::SDSF_L
*/
struct OrderList : OrderListPool::PoolItem<&_orderlist_pool> {
private:
friend void AfterLoadVehicles(bool part_of_load); ///< For instantiating the shared vehicle chain
friend void AfterLoadVehiclesPhase1(bool part_of_load); ///< For instantiating the shared vehicle chain
friend SaveLoadTable GetOrderListDescription(); ///< Saving and loading of order lists.
friend upstream_sl::SaveLoadTable upstream_sl::GetOrderListDescription(); ///< Saving and loading of order lists.
friend void Ptrs_ORDL(); ///< Saving and loading of order lists.