From 5220796d65d7d44ece2e7d941c06538aa00cea4a Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 5 Jan 2007 14:26:45 +0000 Subject: [PATCH] (svn r7864) -Codechange: Offset engines/wagons in the train details window by half the train length modifier. This stops overflowing wagons in sets that use 32px lengths. --- src/train_gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train_gui.c b/src/train_gui.c index a99170b682..7a5176c80c 100644 --- a/src/train_gui.c +++ b/src/train_gui.c @@ -978,7 +978,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);