forked from mirror/OpenTTD
(svn r6052) -Codechange: change OrderType (order->type) in a typedef
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better -Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
This commit is contained in:
@@ -2399,7 +2399,6 @@ static uint32 VehicleEnter_Station(Vehicle *v, TileIndex tile, int x, int y)
|
||||
*/
|
||||
static void DeleteStation(Station *st)
|
||||
{
|
||||
Order order;
|
||||
StationID index;
|
||||
Vehicle *v;
|
||||
st->xy = 0;
|
||||
@@ -2412,10 +2411,8 @@ static void DeleteStation(Station *st)
|
||||
index = st->index;
|
||||
DeleteWindowById(WC_STATION_VIEW, index);
|
||||
|
||||
//Now delete all orders that go to the station
|
||||
order.type = OT_GOTO_STATION;
|
||||
order.station = index;
|
||||
DeleteDestinationFromVehicleOrder(order);
|
||||
/* Now delete all orders that go to the station */
|
||||
RemoveOrderFromAllVehicles(OT_GOTO_STATION, index);
|
||||
|
||||
//And do the same with aircraft that have the station as a hangar-stop
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
|
Reference in New Issue
Block a user