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 | 497e5fe565a7092b21e4c8c5ca3ab6cdcf07c822 (patch) | |
tree | 0b37f73c50958d5bf1aafa42df0730491c179b20 /src/cargotype.h | |
parent | d947f5cec9fee3f1388cc986e7f32afa1e118b18 (diff) | |
download | openttd-497e5fe565a7092b21e4c8c5ca3ab6cdcf07c822.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 */ |