(svn r12593) -Codechange: hide Order's flags in most of the code.

This commit is contained in:
rubidium
2008-04-06 15:09:45 +00:00
parent e150643d31
commit 53d101cc99
17 changed files with 118 additions and 94 deletions

View File

@@ -1967,13 +1967,13 @@ int WhoCanServiceIndustry(Industry* ind)
*/
const Order *o;
FOR_VEHICLE_ORDERS(v, o) {
if (o->IsType(OT_GOTO_STATION) && !HasBit(o->flags, OF_TRANSFER)) {
if (o->IsType(OT_GOTO_STATION) && !HasBit(o->GetUnloadType(), OF_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->flags, OF_UNLOAD) && !c_accepts) break;
if (HasBit(o->GetUnloadType(), OF_UNLOAD) && !c_accepts) break;
if (stations.find(st) != stations.end()) {
if (v->owner == _local_player) return 2; // Player services industry