From 4acb68e539ecb8559ff499a2917c29969f5252ac Mon Sep 17 00:00:00 2001 From: PeterN Date: Tue, 1 Aug 2023 15:05:42 +0100 Subject: [PATCH] Fix #11162: Get colour map of correct train part. (#11163) --- src/train_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 4c121fb1356..00d2703e558 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -378,7 +378,7 @@ void DrawTrainDetails(const Train *v, const Rect &r, int vscroll_pos, uint16_t v if (e->GetGRF() != nullptr) { pitch = ScaleSpriteTrad(e->GetGRF()->traininfo_vehicle_pitch); } - PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); + PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(u); VehicleSpriteSeq seq; u->GetImage(dir, EIT_IN_DETAILS, &seq); seq.Draw(px + (rtl ? -offset.x : offset.x), r.top - line_height * vscroll_pos + sprite_y_offset + pitch, pal, (v->vehstatus & VS_CRASHED) != 0);