mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r17930) -Fix (r17926): Aircraft were not carrying mail anymore, when CB15 was in use.
This commit is contained in:
parent
2d5aebb1f1
commit
3a95e115fc
@ -1387,6 +1387,9 @@ uint GetVehicleCapacity(const Vehicle *v, uint16 *mail_capacity)
|
|||||||
|
|
||||||
if (!e->CanCarryCargo()) return 0;
|
if (!e->CanCarryCargo()) return 0;
|
||||||
|
|
||||||
|
if (mail_capacity != NULL && e->type == VEH_AIRCRAFT && IsCargoInClass(v->cargo_type, CC_PASSENGERS)) {
|
||||||
|
*mail_capacity = e->u.air.mail_capacity;
|
||||||
|
}
|
||||||
CargoID default_cargo = e->GetDefaultCargoType();
|
CargoID default_cargo = e->GetDefaultCargoType();
|
||||||
|
|
||||||
/* Check the refit capacity callback if we are not in the default configuration.
|
/* Check the refit capacity callback if we are not in the default configuration.
|
||||||
@ -1411,9 +1414,7 @@ uint GetVehicleCapacity(const Vehicle *v, uint16 *mail_capacity)
|
|||||||
* Note: This might change to become more consistent/flexible. */
|
* Note: This might change to become more consistent/flexible. */
|
||||||
if (e->type != VEH_SHIP) {
|
if (e->type != VEH_SHIP) {
|
||||||
if (e->type == VEH_AIRCRAFT) {
|
if (e->type == VEH_AIRCRAFT) {
|
||||||
if (IsCargoInClass(v->cargo_type, CT_PASSENGERS)) {
|
if (!IsCargoInClass(v->cargo_type, CT_PASSENGERS)) {
|
||||||
if (mail_capacity != NULL) *mail_capacity = e->u.air.mail_capacity;
|
|
||||||
} else {
|
|
||||||
capacity += e->u.air.mail_capacity;
|
capacity += e->u.air.mail_capacity;
|
||||||
}
|
}
|
||||||
if (v->cargo_type == CT_MAIL) return capacity;
|
if (v->cargo_type == CT_MAIL) return capacity;
|
||||||
|
Loading…
Reference in New Issue
Block a user