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

pull/603/merge
PeterN 11 months ago committed by GitHub
parent 43559524eb
commit 4acb68e539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save