Codechange: Always set the ODATFB_NEAREST_DEPOT flag for 'any depot' orders

This commit is contained in:
Nicolas Chappe
2022-07-26 18:27:54 +02:00
committed by Michael Lutz
parent 4daad7f348
commit a9a21e784d
6 changed files with 12 additions and 8 deletions

View File

@@ -2864,7 +2864,7 @@ public:
SetDParam(0, v->type);
SetDParam(1, v->current_order.GetDestination());
SetDParam(2, v->GetDisplaySpeed());
if (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
if (v->current_order.GetDestination() == INVALID_DEPOT) {
/* This case *only* happens when multiple nearest depot orders
* follow each other (including an order list only one order: a
* nearest depot order) and there are no reachable depots.