diff options
author | peter1138 <peter1138@openttd.org> | 2007-02-24 23:36:40 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-02-24 23:36:40 +0000 |
commit | 4c4b035175a6b8c23793bc3250c75bf50c4d72bd (patch) | |
tree | 368b3cf550c0fcbbf2c814f0896d36aa12a8e28d /src/vehicle.cpp | |
parent | 29c81427842d282127c0e12789a156a1f833dcae (diff) | |
download | openttd-4c4b035175a6b8c23793bc3250c75bf50c4d72bd.tar.xz |
(svn r8891) -Codechange: Remove remains of global cargo scheme. All cargo mapping is now dealt with only in NewGRF code, on load where possible.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 7668c3a3a..c2846ba54 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -762,8 +762,7 @@ bool CanFillVehicle(Vehicle *v) */ bool CanRefitTo(EngineID engine_type, CargoID cid_to) { - CargoID cid = GetCargo(cid_to)->bitnum; - return HASBIT(EngInfo(engine_type)->refit_mask, cid); + return HASBIT(EngInfo(engine_type)->refit_mask, cid_to); } /** Find the first cargo type that an engine can be refitted to. @@ -776,7 +775,7 @@ CargoID FindFirstRefittableCargo(EngineID engine_type) if (refit_mask != 0) { for (CargoID cid = CT_PASSENGERS; cid < NUM_CARGO; cid++) { - if (HASBIT(refit_mask, GetCargo(cid)->bitnum)) return cid; + if (HASBIT(refit_mask, cid)) return cid; } } |