(svn r12617) -Codechange: add type safety to the Order's load and unload types.

This commit is contained in:
rubidium
2008-04-07 20:03:46 +00:00
parent f35612bd21
commit 973997e896
9 changed files with 56 additions and 57 deletions

View File

@@ -2175,7 +2175,7 @@ uint8 CalcPercentVehicleFilled(Vehicle *v, StringID *color)
max += v->cargo_cap;
if (v->cargo_cap != 0) {
unloading += HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) ? 1 : 0;
loading |= !HasBit(u->current_order.GetUnloadType(), OF_UNLOAD) && st->goods[v->cargo_type].days_since_pickup != 255;
loading |= !(u->current_order.GetUnloadType() & OUFB_UNLOAD) && st->goods[v->cargo_type].days_since_pickup != 255;
cars++;
}
}