From 59cb258578515371ecd71f3aa1362501e5534daf Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 22 Feb 2007 22:53:49 +0000 Subject: (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. --- src/train_cmd.cpp | 3 +-- 1 file changed, 1 insertion(+), 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; } -- cgit v1.2.3-70-g09d2