Merge branch 'master' into jgrpp
# Conflicts: # config.lib
This commit is contained in:
@@ -1328,7 +1328,8 @@ static uint GetLoadAmount(Vehicle *v)
|
||||
/* Scale load amount the same as capacity */
|
||||
if (HasBit(e->info.misc_flags, EF_NO_DEFAULT_CARGO_MULTIPLIER) && !air_mail) load_amount = CeilDiv(load_amount * CargoSpec::Get(v->cargo_type)->multiplier, 0x100);
|
||||
|
||||
return load_amount;
|
||||
/* Zero load amount breaks a lot of things. */
|
||||
return max(1u, load_amount);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1662,6 +1663,7 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, load_amount) : cargo_count;
|
||||
bool remaining = false; // Are there cargo entities in this vehicle that can still be unloaded here?
|
||||
|
||||
assert(payment != NULL);
|
||||
payment->SetCargo(v->cargo_type);
|
||||
|
||||
if (!HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) {
|
||||
|
Reference in New Issue
Block a user