1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

Fix #11162: Get colour map of correct train part. (#11163)

This commit is contained in:
2023-08-01 15:05:42 +01:00
committed by GitHub
parent 43559524eb
commit 4acb68e539

View File

@@ -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);