forked from mirror/OpenTTD
(svn r5336) - NewGRF: draw custom helicopter rotor sprites in vehicle info window, ensuring the correct direction is used (inspiration from mart3p)
This commit is contained in:
@@ -79,7 +79,11 @@ static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selectio
|
||||
{
|
||||
PalSpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
|
||||
DrawSprite(GetAircraftImage(v, DIR_W) | pal, x + 25, y + 10);
|
||||
if (v->subtype == 0) DrawSprite(SPR_ROTOR_STOPPED, x + 25, y + 5);
|
||||
if (v->subtype == 0) {
|
||||
SpriteID rotor_sprite = GetCustomRotorSprite(v, true);
|
||||
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
|
||||
DrawSprite(rotor_sprite, x + 25, y + 5);
|
||||
}
|
||||
if (v->index == selection) {
|
||||
DrawFrameRect(x - 1, y - 1, x + 58, y + 21, 0xF, FR_BORDERONLY);
|
||||
}
|
||||
|
Reference in New Issue
Block a user