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/train_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/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 2a639666d..c78300f19 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1934,6 +1934,8 @@ CommandCost CmdForceTrainProceed(TileIndex tile, DoCommandFlag flags, uint32 p1, Train *t = Train::GetIfValid(p1); if (t == NULL) return CMD_ERROR; + if (!t->IsPrimaryVehicle()) return CMD_ERROR; + CommandCost ret = CheckOwnership(t->owner); if (ret.Failed()) return ret; |