diff options
author | frosch <frosch@openttd.org> | 2009-07-19 19:17:41 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-07-19 19:17:41 +0000 |
commit | 7b92d9efe4efbc69b4a2b4563f2fc7645bc8938d (patch) | |
tree | 8494dfb1d08cb55203440c4c2f02f077394b6041 /src/depot_gui.cpp | |
parent | 3999dbe7f786931607c0f185ed1fc166b0bdd012 (diff) | |
download | openttd-7b92d9efe4efbc69b4a2b4563f2fc7645bc8938d.tar.xz |
(svn r16884) -Codechange: Add Train::GetFirstEnginePart() and use it.
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 91df5b642..a311ebd75 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -453,10 +453,7 @@ struct DepotWindow : Window { if (x < 0) break; } - /* if an articulated part was selected, find its parent */ - while (v != NULL && v->IsArticulatedPart()) v = v->Previous(); - - d->wagon = v; + d->wagon = (v != NULL ? v->GetFirstEnginePart() : NULL); return MODE_DRAG_VEHICLE; } |