(svn r9869) -Codechange: replace some bytes with VehicleType, i.e. more type strictness.

This commit is contained in:
rubidium
2007-05-18 17:31:41 +00:00
parent 2196abd71d
commit ba24c34f85
13 changed files with 39 additions and 28 deletions

View File

@@ -4550,6 +4550,8 @@ static void CalculateRefitMasks()
/* Check if this engine's cargo type is valid. If not, set to the first refittable
* cargo type. Apparently cargo_type isn't a common property... */
switch (GetEngine(engine)->type) {
default: NOT_REACHED();
case VEH_AIRCRAFT: break;
case VEH_TRAIN: {
RailVehicleInfo *rvi = &_rail_vehicle_info[engine];
if (rvi->cargo_type == CT_INVALID) rvi->cargo_type = FindFirstRefittableCargo(engine);