diff options
author | rubidium <rubidium@openttd.org> | 2007-05-25 11:01:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-25 11:01:44 +0000 |
commit | d234e97f8bc08854859d3b36deb918481f54aa5f (patch) | |
tree | 580ae7c52465651d6884e80e160f9c107cd0d38e /src/autoreplace_gui.cpp | |
parent | 9060ab4af1e3e39bb43374af655c476e26307a39 (diff) | |
download | openttd-d234e97f8bc08854859d3b36deb918481f54aa5f.tar.xz |
(svn r9919) -Codechange: prepare some more places for more road types.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 9a0e1467e..e1925e7d0 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -160,6 +160,9 @@ static void GenerateReplaceVehList(Window *w, bool draw_left) /* This is for engines we can replace to and they should depend on what we selected to replace from */ if (!IsEngineBuildable(e, type, _local_player)) continue; // we need to be able to build the engine if (!EnginesGotCargoInCommon(e, WP(w, replaceveh_d).sel_engine[0])) continue; // the engines needs to be able to carry the same cargo + + /* Road vehicles can't be replaced by trams and vice-versa */ + if (type == VEH_ROAD && HASBIT(EngInfo(WP(w, replaceveh_d).sel_engine[0])->misc_flags, EF_ROAD_TRAM) != HASBIT(EngInfo(e)->misc_flags, EF_ROAD_TRAM)) continue; if (e == WP(w, replaceveh_d).sel_engine[0]) continue; // we can't replace an engine into itself (that would be autorenew) } |