diff options
author | darkvater <darkvater@openttd.org> | 2005-01-10 14:56:26 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2005-01-10 14:56:26 +0000 |
commit | 83b2abb6d6da9ac7ef53d3d60617e95bf87c47e3 (patch) | |
tree | 7ca6c10af36fca82cd1d16d5f1be216f881c591e /roadveh_gui.c | |
parent | 29b4ab04c319f6b88e724ff79d73ca49f5676eaa (diff) | |
download | openttd-83b2abb6d6da9ac7ef53d3d60617e95bf87c47e3.tar.xz |
(svn r1466) -Fix: oops, depot windows can of course also scroll horizontally. Thanks si-m1.
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r-- | roadveh_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c index 5fad9f8a0..d2ae1ceea 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -551,14 +551,14 @@ static int GetVehicleFromRoadDepotWndPt(Window *w, int x, int y, Vehicle **veh) xt = x / 56; xm = x % 56; - if (xt >= 5) + if (xt >= w->hscroll.cap) return 1; row = (y - 14) / 14; if (row >= w->vscroll.cap) return 1; - pos = (row + w->vscroll.pos) * 5 + xt; + pos = (row + w->vscroll.pos) * w->hscroll.cap + xt; tile = w->window_number; FOR_ALL_VEHICLES(v) { |