summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-02-04 21:48:46 +0000
committerpeter1138 <peter1138@openttd.org>2006-02-04 21:48:46 +0000
commit2d67fc8741032ce3b92b7aa64f110cf914c92be2 (patch)
tree87ce1a898e14813f5cc02bbe02c5671b8f166c37 /train_gui.c
parentc77c99b3c78add8f38d48e623f750faa7820e28c (diff)
downloadopenttd-2d67fc8741032ce3b92b7aa64f110cf914c92be2.tar.xz
(svn r3546) - NewGRF feature: Implement rail vehicle 'property' 0x1A: allows shuffling order of rail vehicle purchase list (and replace vehicle list)
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/train_gui.c b/train_gui.c
index f71339092..ede95848c 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -170,9 +170,10 @@ void CcCloneTrain(bool success, uint tile, uint32 p1, uint32 p2)
static void engine_drawing_loop(int *x, int *y, int *pos, int *sel,
EngineID* selected_id, RailType railtype, byte show_max, bool is_engine)
{
- EngineID i;
+ EngineID j;
- for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
+ for (j = 0; j < NUM_TRAIN_ENGINES; j++) {
+ EngineID i = GetRailVehAtPosition(j);
const Engine *e = GetEngine(i);
const RailVehicleInfo *rvi = RailVehInfo(i);