From ae48a7447be849bdad48ca5996a246d29165f39e Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 18 Mar 2007 22:32:05 +0000 Subject: [PATCH] (svn r9303) -Codechange: Use cargo class when counting passengers in a road vehicle crash, and when loading aircraft. --- src/roadveh_cmd.cpp | 2 +- src/vehicle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index aeed9704af..74d7aa7a88 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -596,7 +596,7 @@ static void RoadVehCrash(Vehicle *v) InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); 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; SetDParam(0, pass); diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 3ab08b31a4..29e66640f7 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -700,7 +700,7 @@ static bool CanFillVehicle_FullLoadAny(Vehicle *v) //if the aircraft carries passengers and is NOT full, then //continue loading, no matter how much mail is in if (v->type == VEH_AIRCRAFT && - v->cargo_type == CT_PASSENGERS && + IsCargoInClass(v->cargo_type, CC_PASSENGERS) && v->cargo_cap != v->cargo_count) { return true; }