diff options
author | celestar <celestar@openttd.org> | 2005-07-10 01:25:17 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-10 01:25:17 +0000 |
commit | 84faec4c4341a2310d9e97bc75170231ba5b1d43 (patch) | |
tree | 4d36e1b0eda6ff1c3c42c8febff1fa7cf3ae7484 /train_gui.c | |
parent | 92a89005185d78932f6427ba27bf7d36c9aff20d (diff) | |
download | openttd-84faec4c4341a2310d9e97bc75170231ba5b1d43.tar.xz |
(svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move on more
than one railtype (like Diesel engines on electrified rail).
-Codechange: Use IsCompatibleRail where it should be used
Diffstat (limited to 'train_gui.c')
-rw-r--r-- | train_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/train_gui.c b/train_gui.c index fe0492646..5d070244d 100644 --- a/train_gui.c +++ b/train_gui.c @@ -160,7 +160,7 @@ static void engine_drawing_loop(int *x, int *y, int *pos, int *sel, const Engine *e = GetEngine(i); const RailVehicleInfo *rvi = RailVehInfo(i); - if (e->railtype != railtype || !(rvi->flags & RVI_WAGON) != is_engine || + if (!IsCompatibleRail(railtype, e->railtype) || !(rvi->flags & RVI_WAGON) != is_engine || !HASBIT(e->player_avail, _local_player)) continue; @@ -192,7 +192,7 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e) for (i = 0; i < NUM_TRAIN_ENGINES; i++) { const Engine *e = GetEngine(i); - if (e->railtype == railtype + if (IsCompatibleRail(railtype, e->railtype) && HASBIT(e->player_avail, _local_player)) count++; } |