@@ -1544,17 +1544,15 @@ static CommandCost RemoveRoadStop(Statio
}
InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_ROADVEHS);
delete cur_stop;
/* Make sure no vehicle is going to the old roadstop */
Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->type == VEH_ROAD &&
v->First() == v &&
v->current_order.IsType(OT_GOTO_STATION) &&
RoadVehicle *v;
FOR_ALL_ROADVEHICLES(v) {
if (v->First() == v && v->current_order.IsType(OT_GOTO_STATION) &&
v->dest_tile == tile) {
v->dest_tile = v->GetOrderStationLocation(st->index);
DoClearSquare(tile);
@@ -1961,17 +1959,15 @@ static CommandCost RemoveAirport(Station
const AirportFTAClass *afc = st->Airport();
int w = afc->size_x;
int h = afc->size_y;
CommandCost cost(EXPENSES_CONSTRUCTION, w * h * _price.remove_airport);
const Vehicle *v;
if (!(v->type == VEH_AIRCRAFT && IsNormalAircraft(v))) continue;
const Aircraft *a = (const Aircraft *)v;
const Aircraft *a;
FOR_ALL_AIRCRAFT(a) {
if (!IsNormalAircraft(a)) continue;
if (a->targetairport == st->index && a->state != FLYING) return CMD_ERROR;
BEGIN_TILE_LOOP(tile_cur, w, h, tile) {
if (!EnsureNoVehicleOnGround(tile_cur)) return CMD_ERROR;