diff options
author | maedhros <maedhros@openttd.org> | 2007-04-20 11:39:01 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-04-20 11:39:01 +0000 |
commit | aaa917d56dfb284d92dd2d7838ab5dfff201be1b (patch) | |
tree | a5b8b18df7be1b5daeef1dc361167da1f60974b1 /src/roadveh_cmd.cpp | |
parent | 88af5b07d37ff1508e9694e14d6e0d6bb46c184c (diff) | |
download | openttd-aaa917d56dfb284d92dd2d7838ab5dfff201be1b.tar.xz |
(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index fada22c84..79fa60847 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -436,6 +436,8 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (dep == NULL) return_cmd_error(STR_9019_UNABLE_TO_FIND_LOCAL_DEPOT); if (flags & DC_EXEC) { + if (v->current_order.type == OT_LOADING) v->LeaveStation(); + ClearSlot(v); v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP; |