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:
Peter Nelson 2024-04-21 19:41:25 +01:00 committed by GitHub
parent c073165e34
commit 3b01d31280
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

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