summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-05 14:26:45 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-05 14:26:45 +0000
commit0a4b2ae79c6cfc32a673dafc3a9f4d4fdfcbd232 (patch)
tree1586e2c831f7cc6a4cc9b0a12f3fcd22ec20ab58 /src
parent2d3e7aef5165d0991e3bcecb745757e13f9b6c9c (diff)
downloadopenttd-0a4b2ae79c6cfc32a673dafc3a9f4d4fdfcbd232.tar.xz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/train_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_gui.c b/src/train_gui.c
index a99170b68..7a5176c80 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);