From 8c28d4816543429a04b1239c0bd6d2648e52d3cf Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Sun, 21 Jan 2024 11:31:17 -0500 Subject: [PATCH] Codechange: Use economy date_fract when spreading out pathfinder calls --- src/order_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index d6e1748f90..04ada61c7b 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1963,7 +1963,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) { /* If the vehicle can't find its destination, delay its next search. * In case many vehicles are in this state, use the vehicle index to spread out pathfinder calls. */ - if (v->dest_tile == 0 && TimerGameCalendar::date_fract != (v->index % Ticks::DAY_TICKS)) break; + if (v->dest_tile == 0 && TimerGameEconomy::date_fract != (v->index % Ticks::DAY_TICKS)) break; /* We need to search for the nearest depot (hangar). */ ClosestDepot closestDepot = v->FindClosestDepot();