summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-07-13 20:27:54 +0000
committerfrosch <frosch@openttd.org>2009-07-13 20:27:54 +0000
commit8041d37973b302be7a7dd3d827ab982250dffc9b (patch)
tree401c8c12ddc21d3ad894203e80c75797df335f19 /src
parentdb69c343f1c64601ad594bbf0e41b463b9d3a434 (diff)
downloadopenttd-8041d37973b302be7a7dd3d827ab982250dffc9b.tar.xz
(svn r16819) -Fix (r4868): Use the palette of the vehicle being drawn instead of the one of the front vehicle.
Diffstat (limited to 'src')
-rw-r--r--src/train_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 6c5724af3..6f9d70bc1 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -240,7 +240,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
u = v;
do {
- SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
+ SpriteID pal = (u->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(u);
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 += Train::From(u)->tcache.cached_veh_length;
u = u->Next();