1
0
Fork 0

Codechange: Use economy date_fract when spreading out pathfinder calls

pull/10700/head
Tyler Trahan 2024-01-21 11:31:17 -05:00
parent 9d8a55cef7
commit 8c28d48165
1 changed files with 1 additions and 1 deletions

View File

@ -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();