(svn r7954) -Backport from trunk (r7864):

- offset engines/wagons by half width in details window; fixes overflowing for display
This commit is contained in:
Darkvater 2007-01-07 12:18:05 +00:00
parent b342991853
commit 30fadfb54b
1 changed files with 1 additions and 1 deletions

View File

@ -968,7 +968,7 @@ static void DrawTrainDetailsWindow(Window *w)
u = v;
do {
PalSpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(GetTrainImage(u, DIR_W) | pal, x + 14 + WagonLengthToPixels(dx), y + 6 + (is_custom_sprite(RailVehInfo(u->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
DrawSprite(GetTrainImage(u, DIR_W) | pal, x + WagonLengthToPixels(4 + dx), y + 6 + (is_custom_sprite(RailVehInfo(u->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
dx += u->u.rail.cached_veh_length;
u = u->next;
} while (u != NULL && IsArticulatedPart(u) && u->cargo_cap == 0);