diff options
author | peter1138 <peter1138@openttd.org> | 2007-03-18 22:07:44 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-03-18 22:07:44 +0000 |
commit | e485b8f694fa95d2d88e91b1c81e28ce332e361c (patch) | |
tree | 0b37f73c50958d5bf1aafa42df0730491c179b20 /src/cargotype.h | |
parent | f4cad9017e8134cd5ecd21b116bf85a74db471de (diff) | |
download | openttd-e485b8f694fa95d2d88e91b1c81e28ce332e361c.tar.xz |
(svn r9301) -Codechange: Use cargo class to determine if a road vehicle can stop in bus or truck stops.
Diffstat (limited to 'src/cargotype.h')
-rw-r--r-- | src/cargotype.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cargotype.h b/src/cargotype.h index e2574a080..c3bccf791 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -57,5 +57,10 @@ const CargoSpec *GetCargo(CargoID c); /* Get the cargo ID with the cargo label */ CargoID GetCargoIDByLabel(CargoLabel cl); +static inline bool IsCargoInClass(CargoID c, uint16 cc) +{ + return GetCargo(c)->classes & cc; +} + #endif /* CARGOTYPE_H */ |