(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.
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user