mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
parent
6062004960
commit
89613b6cc4
|
@ -49,8 +49,7 @@ static const TrackBits _state_dir_table[4] = { TRACK_BIT_RIGHT, TRACK_BIT_LOWER,
|
||||||
*/
|
*/
|
||||||
byte FreightWagonMult(CargoID cargo)
|
byte FreightWagonMult(CargoID cargo)
|
||||||
{
|
{
|
||||||
// XXX NewCargos introduces a specific "is freight" flag for this test.
|
if (!GetCargo(cargo)->is_freight) return 1;
|
||||||
if (cargo == CT_PASSENGERS || cargo == CT_MAIL) return 1;
|
|
||||||
return _patches.freight_trains;
|
return _patches.freight_trains;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue