diff options
author | peter1138 <peter1138@openttd.org> | 2007-02-22 22:53:49 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-02-22 22:53:49 +0000 |
commit | 89613b6cc4085210dfea681d22b79fe21df3d41b (patch) | |
tree | f47b92793a356e0dd3ff4ae8b69334996648a37a /src | |
parent | 60620049606d5ce556d26ddaf401fcf5f28f1954 (diff) | |
download | openttd-89613b6cc4085210dfea681d22b79fe21df3d41b.tar.xz |
(svn r8850) -Codechange: Use the cargo type's is_freight flag instead of checking the cargo type to determine if the cargo type is freight cargo type cargo type.
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 7dd31711e..ff22b71d7 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -49,8 +49,7 @@ static const TrackBits _state_dir_table[4] = { TRACK_BIT_RIGHT, TRACK_BIT_LOWER, */ byte FreightWagonMult(CargoID cargo) { - // XXX NewCargos introduces a specific "is freight" flag for this test. - if (cargo == CT_PASSENGERS || cargo == CT_MAIL) return 1; + if (!GetCargo(cargo)->is_freight) return 1; return _patches.freight_trains; } |