summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-04-20 11:39:01 +0000
committermaedhros <maedhros@openttd.org>2007-04-20 11:39:01 +0000
commit034f3591cf6137136333f9769efbcb0bdd03f03c (patch)
treea5b8b18df7be1b5daeef1dc361167da1f60974b1 /src/aircraft_cmd.cpp
parent8b65349d86f0bf71af0ec1a9bf1c08cd9adac2ec (diff)
downloadopenttd-034f3591cf6137136333f9769efbcb0bdd03f03c.tar.xz
(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index aabe323bd..3950cae50 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -571,6 +571,8 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
}
if (flags & DC_EXEC) {
+ if (v->current_order.type == OT_LOADING) v->LeaveStation();
+
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);