Use _scaled_date_ticks in ODATFB_NEAREST_DEPOT rate-limiting
This commit is contained in:
@@ -3375,7 +3375,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
|
|||||||
if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
|
if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
|
||||||
/* If the vehicle can't find its destination, delay its next search.
|
/* 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. */
|
* In case many vehicles are in this state, use the vehicle index to spread out pathfinder calls. */
|
||||||
if (v->dest_tile == 0 && (_scaled_tick_counter & 0x3F) != (v->index & 0x3F)) break;
|
if (v->dest_tile == 0 && (_scaled_date_ticks.base() & 0x3F) != (v->index & 0x3F)) break;
|
||||||
|
|
||||||
/* We need to search for the nearest depot (hangar). */
|
/* We need to search for the nearest depot (hangar). */
|
||||||
ClosestDepot closestDepot = v->FindClosestDepot();
|
ClosestDepot closestDepot = v->FindClosestDepot();
|
||||||
|
Reference in New Issue
Block a user