Skip to content

Commit

Permalink
Fix 8746be8: Reinstate current order test when removing road stop. (#…
Browse files Browse the repository at this point in the history
…12552)

#12144 replaced pool iteration with FindVehiclesWithOrder, however the test for current_order being OT_GOTO_STATION was erroneously removed.
  • Loading branch information
PeterN committed Apr 21, 2024
1 parent c073165 commit 3b01d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/station_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down

0 comments on commit 3b01d31

Please sign in to comment.