(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.

This commit is contained in:
maedhros
2007-04-20 11:39:01 +00:00
parent 8b65349d86
commit 034f3591cf
4 changed files with 9 additions and 2 deletions

View File

@@ -1065,6 +1065,8 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (dep == NULL) return_cmd_error(STR_981A_UNABLE_TO_FIND_LOCAL_DEPOT);
if (flags & DC_EXEC) {
if (v->current_order.type == OT_LOADING) v->LeaveStation();
v->dest_tile = dep->xy;
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;