Only warn about duplicate orders for go to type orders

This commit is contained in:
Jonathan G Rennison 2024-07-21 22:20:13 +01:00
parent e1aa220981
commit 19a671cfb8

View File

@ -2919,8 +2919,8 @@ void CheckOrders(const Vehicle *v)
} }
} }
/* Check if the last and the first order are the same */ /* Check if the last and the first order are the same, and the first order is a go to order */
if (v->GetNumOrders() > 1) { if (v->GetNumOrders() > 1 && v->orders->GetFirstOrder()->IsGotoOrder()) {
const Order *last = v->GetLastOrder(); const Order *last = v->GetLastOrder();
if (v->orders->GetFirstOrder()->Equals(*last)) { if (v->orders->GetFirstOrder()->Equals(*last)) {