summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-22 17:13:49 +0000
committertruelight <truelight@openttd.org>2006-08-22 17:13:49 +0000
commit1331b4aa9a525bb87c76c38bbc42d33d099bd026 (patch)
tree6fd89f2a96b8f71b4b34dda81300e4dd18bd4e6e /station_cmd.c
parent88d196dff1a8e6f315d865765a05c25da72e11fd (diff)
downloadopenttd-1331b4aa9a525bb87c76c38bbc42d33d099bd026.tar.xz
(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
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/station_cmd.c b/station_cmd.c
index afd5e3581..974d7be1d 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -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) {