summaryrefslogtreecommitdiff
path: root/src/depot_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-02-04 15:40:35 +0000
committerrubidium <rubidium@openttd.org>2011-02-04 15:40:35 +0000
commitc85d350310d220885e07a5eed327110a4169f56b (patch)
tree2cc633d0b25bd501d2f8022856746a3be6f7c0c1 /src/depot_gui.cpp
parent46b3d114a828916226d66ec7536af9f62948759a (diff)
downloadopenttd-c85d350310d220885e07a5eed327110a4169f56b.tar.xz
(svn r21960) -Change: show the length of vehicles in tiles, instead of half tiles in the depot
-Fix [FS#4461]: don't count the number of vehicles but the length of vehicles to (configurably) limit train length
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r--src/depot_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 6d32fd761..d3866af42 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -285,8 +285,8 @@ struct DepotWindow : Window {
DrawTrainImage(u, image_left + (rtl ? 0 : x_space), image_right - (rtl ? x_space : 0), sprite_y - 1,
this->sel, free_wagon ? 0 : this->hscroll->GetPosition(), this->vehicle_over);
- /* Number of wagons relative to a standard length wagon (rounded up) */
- SetDParam(0, CeilDiv(u->gcache.cached_total_length, 8));
+ /* Length of consist in tiles (rounded up) */
+ SetDParam(0, CeilDiv(u->gcache.cached_total_length, TILE_SIZE));
DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_COMA, TC_FROMSTRING, SA_RIGHT); // Draw the counter
break;
}