summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-02-22 22:53:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-02-22 22:53:49 +0000
commit59cb258578515371ecd71f3aa1362501e5534daf (patch)
treef47b92793a356e0dd3ff4ae8b69334996648a37a /src/train_cmd.cpp
parent2306a02f75f53e673ea9e113e7edea794b3b088a (diff)
downloadopenttd-59cb258578515371ecd71f3aa1362501e5534daf.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/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp3
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;
}