mirror of https://github.com/OpenTTD/OpenTTD.git
Fix 8746be8: Reinstate current order test when removing road stop. (#12552)
#12144 replaced pool iteration with FindVehiclesWithOrder, however the test for current_order being OT_GOTO_STATION was erroneously removed.
This commit is contained in:
parent
c073165e34
commit
3b01d31280
|
@ -2192,7 +2192,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags, int repla
|
|||
[](const Vehicle *v) { return v->type == VEH_ROAD; },
|
||||
[station_id](const Order *order) { return order->IsType(OT_GOTO_STATION) && order->GetDestination() == station_id; },
|
||||
[station_id, tile](Vehicle *v) {
|
||||
if (v->dest_tile == tile) {
|
||||
if (v->current_order.IsType(OT_GOTO_STATION) && v->dest_tile == tile) {
|
||||
v->SetDestTile(v->GetOrderStationLocation(station_id));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue