Skip to content

Commit

Permalink
Fix #11162: Get colour map of correct train part. (#11163)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterN authored Aug 1, 2023
1 parent 4355952 commit 4acb68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/train_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4acb68e

Please sign in to comment.