(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.

This commit is contained in:
peter1138 2007-02-22 22:53:49 +00:00
parent 6062004960
commit 89613b6cc4
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}