mirror of https://github.com/OpenTTD/OpenTTD
(svn r9303) -Codechange: Use cargo class when counting passengers in a road vehicle crash, and when loading aircraft.
parent
8ef0e43b94
commit
ae48a7447b
|
@ -596,7 +596,7 @@ static void RoadVehCrash(Vehicle *v)
|
||||||
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
|
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
|
||||||
|
|
||||||
pass = 1;
|
pass = 1;
|
||||||
if (v->cargo_type == CT_PASSENGERS) pass += v->cargo_count;
|
if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
|
||||||
v->cargo_count = 0;
|
v->cargo_count = 0;
|
||||||
|
|
||||||
SetDParam(0, pass);
|
SetDParam(0, pass);
|
||||||
|
|
|
@ -700,7 +700,7 @@ static bool CanFillVehicle_FullLoadAny(Vehicle *v)
|
||||||
//if the aircraft carries passengers and is NOT full, then
|
//if the aircraft carries passengers and is NOT full, then
|
||||||
//continue loading, no matter how much mail is in
|
//continue loading, no matter how much mail is in
|
||||||
if (v->type == VEH_AIRCRAFT &&
|
if (v->type == VEH_AIRCRAFT &&
|
||||||
v->cargo_type == CT_PASSENGERS &&
|
IsCargoInClass(v->cargo_type, CC_PASSENGERS) &&
|
||||||
v->cargo_cap != v->cargo_count) {
|
v->cargo_cap != v->cargo_count) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue