summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-21 14:33:33 +0000
committerrubidium <rubidium@openttd.org>2008-04-21 14:33:33 +0000
commit5ef8c01ce7d7b554d678d5270baafb1146c80b57 (patch)
tree4c1ef67d89a0fbc13b10c3ed8a9880350b14ab12 /src/economy.cpp
parent22140d82c6efb1a6a03e1e4db0eca48766dce8ba (diff)
downloadopenttd-5ef8c01ce7d7b554d678d5270baafb1146c80b57.tar.xz
(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index b386416f8..a6dbea987 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1595,7 +1595,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
byte load_amount = EngInfo(v->engine_type)->load_amount;
if (_patches.gradual_loading && HasBit(EngInfo(v->engine_type)->callbackmask, CBM_VEHICLE_LOAD_AMOUNT)) {
uint16 cb_load_amount = GetVehicleCallback(CBID_VEHICLE_LOAD_AMOUNT, 0, 0, v->engine_type, v);
- if (cb_load_amount != CALLBACK_FAILED && cb_load_amount != 0) load_amount = cb_load_amount & 0xFF;
+ if (cb_load_amount != CALLBACK_FAILED && GB(cb_load_amount, 0, 8) != 0) load_amount = GB(cb_load_amount, 0, 8);
}
GoodsEntry *ge = &st->goods[v->cargo_type];