summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-22 22:55:41 +0000
committerrubidium <rubidium@openttd.org>2009-05-22 22:55:41 +0000
commitda5661a0c8870c532c393ec3d330c3fbb44eb8ac (patch)
tree93b9332d7e83e012a46777e2baf91bf323ea9fe9 /src/train_gui.cpp
parentc4b627af422075ce4a0e1026c52f871dd3f146c0 (diff)
downloadopenttd-da5661a0c8870c532c393ec3d330c3fbb44eb8ac.tar.xz
(svn r16393) -Codechange: move VehicleRail to Train.
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index d351ce708..bda118815 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -81,7 +81,7 @@ void DrawTrainImage(const Vehicle *v, int x, int y, VehicleID selection, int cou
_cur_dpi = &tmp_dpi;
do {
- int width = v->u.rail.cached_veh_length;
+ int width = ((Train *)v)->tcache.cached_veh_length;
if (dx + width > 0) {
if (dx <= count) {
@@ -228,7 +228,7 @@ void DrawTrainDetails(const Vehicle *v, int left, int right, int y, int vscroll_
do {
SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(u->GetImage(DIR_W), pal, x + WagonLengthToPixels(4 + dx), y + 6 + (is_custom_sprite(RailVehInfo(u->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
- dx += u->u.rail.cached_veh_length;
+ dx += ((Train *)u)->tcache.cached_veh_length;
u = u->Next();
} while (u != NULL && IsArticulatedPart(u) && u->cargo_cap == 0);