summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-07 20:03:46 +0000
committerrubidium <rubidium@openttd.org>2008-04-07 20:03:46 +0000
commit973997e896aeaaf36780abc3c51b1c115cec0535 (patch)
tree6b2bd1bb1a800edf7ded9987b1d3796b6f33a7c3 /src/industry_cmd.cpp
parentf35612bd21374ee0aa77c0a79b6546922d43add0 (diff)
downloadopenttd-973997e896aeaaf36780abc3c51b1c115cec0535.tar.xz
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 510aa2219..aaf06cebb 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1968,13 +1968,13 @@ int WhoCanServiceIndustry(Industry* ind)
*/
const Order *o;
FOR_VEHICLE_ORDERS(v, o) {
- if (o->IsType(OT_GOTO_STATION) && !HasBit(o->GetUnloadType(), OF_TRANSFER)) {
+ if (o->IsType(OT_GOTO_STATION) && !(o->GetUnloadType() & OUFB_TRANSFER)) {
/* Vehicle visits a station to load or unload */
Station *st = GetStation(o->GetDestination());
if (!st->IsValid()) continue;
/* Same cargo produced by industry is dropped here => not serviced by vehicle v */
- if (HasBit(o->GetUnloadType(), OF_UNLOAD) && !c_accepts) break;
+ if ((o->GetUnloadType() & OUFB_UNLOAD) && !c_accepts) break;
if (stations.find(st) != stations.end()) {
if (v->owner == _local_player) return 2; // Player services industry