diff options
author | frosch <frosch@openttd.org> | 2012-07-07 15:35:28 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-07-07 15:35:28 +0000 |
commit | 22632d5e9ae1851e4e59788b6d70640b0d7de7ea (patch) | |
tree | f8f3df540c7d3efbf3ae8592a19fe7b9d5730a76 /src/vehicle_cmd.cpp | |
parent | e0cf1e3e946e4fe84eae582c388b64f1d247d008 (diff) | |
download | openttd-22632d5e9ae1851e4e59788b6d70640b0d7de7ea.tar.xz |
(svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon).
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 8899b5f32..cf225a210 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -991,6 +991,7 @@ CommandCost CmdSendVehicleToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1 Vehicle *v = Vehicle::GetIfValid(GB(p1, 0, 20)); if (v == NULL) return CMD_ERROR; + if (!v->IsPrimaryVehicle()) return CMD_ERROR; return v->SendToDepot(flags, (DepotCommand)(p1 & DEPOT_COMMAND_MASK)); } |