1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 14:39:08 +00:00

(svn r18381) -Codechange: Add RoadVehicle::IsBus() to simplify some stuff.

This commit is contained in:
frosch
2009-12-02 17:37:02 +00:00
parent 2265202d77
commit 59f9163e37
8 changed files with 25 additions and 14 deletions

View File

@@ -28,7 +28,7 @@
#include "../company_func.h"
#include "../company_gui.h"
#include "../window_func.h"
#include "../cargotype.h"
#include "../roadveh.h"
#include "table/strings.h"
@@ -1368,7 +1368,7 @@ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats)
byte type = 0;
switch (v->type) {
case VEH_TRAIN: type = 0; break;
case VEH_ROAD: type = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? 2 : 1; break;
case VEH_ROAD: type = RoadVehicle::From(v)->IsBus() ? 2 : 1; break;
case VEH_AIRCRAFT: type = 3; break;
case VEH_SHIP: type = 4; break;
default: continue;